Deprecated: Return type of ResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 174
Deprecated: Return type of ResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 192
Deprecated: Return type of ResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 185
Deprecated: Return type of ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 202
Deprecated: Return type of ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 163
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
|
|
| =Introduction= | | =Introduction= |
− | One of the great things about Rave is that it can work not only with static data sets, but with functions of variables that appear in data sets. For example, if you load a data set that contains a variable called "Weight (lbs)", you can easily create a new variable called "Weight (kg)" whose values are equal to Weight (lbs) / 2.2046. If later the values for the variable Weight (lbs) change, the values for Weight (kg) will automatically update to reflect that change, because the two are functionally related. | + | One of the great things about Rave is that it can work not only with static [[data sets]], but with functions of variables that appear in [[data sets]]. For example, if you load a [[data set]] that contains a variable called "Weight (lbs)", you can easily create a new variable called "Weight (kg)" whose values are equal to Weight (lbs) / 2.2046. If later the values for the variable Weight (lbs) change, the values for Weight (kg) will automatically update to reflect that change, because the two are functionally related. |
| | | |
− | The above example is an extremely simple function. In general there is no limit to how complicated your function can be, although if the function takes a long time to run it may be impractical for some applications. Functions can have multiple variables as inputs, and may have other functional variables as inputs as well (for example, y = f(x), z = g(y)). | + | The above example is an extremely simple function. In general there is no limit to how complicated your function can be, although if the function takes a long time to run it may be impractical for some applications. Functions can have multiple variables as inputs, and may have other [[functional variables]] as inputs as well (for example, y = f(x), z = g(y)). |
| | | |
− | An important limitation, however, is that the relations between your variables must form a "directed acyclic graph". Put simply, this means that each functional variable must be able to be represented as a function of only independent variables in the data set (although as described above, your actual implementation may involve other functional variables). Functions that form a "circular logic" loop are not allowed (for example y=f(z), z=g(y) ). | + | An important limitation, however, is that the relations between your variables must form a "directed acyclic graph". Put simply, this means that each [[functional variable]] must be able to be represented as a function of only [[independent variables]] in the [[data set]] (although as described above, your actual implementation may involve other [[functional variables]]). Functions that form a "circular logic" loop are not allowed (for example y=f(z), z=g(y) ). |
| | | |
| =Functions vs. Functional Variables= | | =Functions vs. Functional Variables= |
− | A '''functional variable''' is a variable in Rave whose value is calculated by a function. A "function" in this context is a MATLAB .m function file, in particular it is a MATLAB file that calculates the functional variable as one of its outputs. You create functional variables in Rave by loading functions into Rave or by creating functions using Rave. Note that if you create the function using Rave, the actual MATLAB function file will get created "behind the scenes" and you will typically never directly view or edit the function file. | + | A '''[[functional variable]]''' is a variable in Rave whose value is calculated by a function. A "function" in this context is a MATLAB .m function file, in particular it is a MATLAB file that calculates the [[functional variable]] as one of its outputs. You create [[functional variables]] in Rave by loading functions into Rave or by creating functions using Rave. Note that if you create the function using Rave, the actual MATLAB function file will get created "behind the scenes" and you will typically never directly view or edit the function file. |
| | | |
− | The sections below describe the two ways of creating functional variables: loading functions, and creating functions. | + | The sections below describe the two ways of creating [[functional variables]]: loading functions, and creating functions. |
| | | |
| =Loading Functions into Rave= | | =Loading Functions into Rave= |
|
|
| Rave can load two types of functions: plain text functions, and MATLAB .m file functions. Plain text functions are limited to fairly simple mathematical expressions, whereas MATLAB .m file functions can do almost anything. | | Rave can load two types of functions: plain text functions, and MATLAB .m file functions. Plain text functions are limited to fairly simple mathematical expressions, whereas MATLAB .m file functions can do almost anything. |
| | | |
− | In either case, the functions must be of the form: [one ore more functional variables ] = ''function of''(one or more Rave variables) | + | In either case, the functions must be of the form: [one ore more [[functional variables]] ] = ''function of''(one or more Rave variables) |
| | | |
− | The important thing here is that the inputs to the function must be variables that exist in your data set at the time you load the function. This limitation automatically ensures that your network of functions obeys the "directed acyclic graph" constraint. For example, it is impossible to load two functions y=f(z) and z=g(y), because the input variable of whichever function you attempt to load first would not yet exist as a variable in Rave. | + | The important thing here is that the inputs to the function must be variables that exist in your [[data set]] at the time you load the function. This limitation automatically ensures that your network of functions obeys the "directed acyclic graph" constraint. For example, it is impossible to load two functions y=f(z) and z=g(y), because the input variable of whichever function you attempt to load first would not yet exist as a variable in Rave. |
| | | |
− | In all cases, functions are loaded from the [[Model Tab]]. Follow the link to the model tab for a description of the buttons that appear on that tab. | + | In all cases, functions are loaded from the [[Model Tab]]. Follow the link to the [[model tab]] for a description of the buttons that appear on that tab. |
| | | |
− | See the page [[]] | + | *See [[User-Supplied Matlab Function Formats]] for information on using Matlab functions in Rave. |
| + | *See [[User-Supplied Plain Text Function Formats]] for information on using plain text functions in Rave. |
| | | |
| | | |
Fatal error: Uncaught TypeError: MWExceptionHandler::handleException(): Argument #1 ($e) must be of type Exception, Error given in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/exception/MWExceptionHandler.php:153
Stack trace:
#0 [internal function]: MWExceptionHandler::handleException()
#1 {main}
thrown in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/exception/MWExceptionHandler.php on line 153