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

Warning: Trying to access array offset on value of type bool in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/libs/IPSet.php on line 243

Warning: Trying to access array offset on value of type bool in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/libs/IPSet.php on line 246

Warning: Trying to access array offset on value of type bool in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/libs/IPSet.php on line 243

Warning: Trying to access array offset on value of type bool in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/libs/IPSet.php on line 246

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37
https://rave.gatech.edu/help/index.php?title=Vectorized_functions&feed=atom&action=history Vectorized functions - Revision history 2024-03-29T05:30:46Z Revision history for this page on the wiki MediaWiki 1.25.5 https://rave.gatech.edu/help/index.php?title=Vectorized_functions&diff=3331&oldid=prev Admin at 13:20, 23 August 2013 2013-08-23T13:20:22Z <p></p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 13:20, 23 August 2013</td> </tr><tr><td colspan="2" class="diff-lineno" id="L8" >Line 8:</td> <td colspan="2" class="diff-lineno">Line 8:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* ^ with .^</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>* ^ with .^</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The . in front of these operators tells MATLAB to apply the operator to each element of the array instead of treating the array like a matrix and using matrix math operations. Note that the + and - operators do not require a .<del class="diffchange diffchange-inline">, </del>since matrix addition and subtraction already operates on each element individually. Similarly, most other built-in MATLAB functions do not require special vectorization. Examples include exp(), log(), and all the trig functions.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The . in front of these operators tells MATLAB to apply the operator to each element of the array instead of treating the array like a matrix and using matrix math operations. Note that the + and - operators do not require a . since matrix addition and subtraction already operates on each element individually. Similarly, most other built-in MATLAB functions do not require special vectorization. Examples include exp(), log(), and all the trig functions.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>For example, the function y = sin(x1)*x2^2 would be coded in MATLAB as y = sin(x1).*x2.^2</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>For example, the function y = sin(x1)*x2^2 would be coded in MATLAB as y = sin(x1).*x2.^2</div></td></tr> </table> Admin https://rave.gatech.edu/help/index.php?title=Vectorized_functions&diff=3330&oldid=prev Admin: Created page with "A '''vectorized function''' is a basic MATLAB coding concept. It refers to a function that operates on each element of an array independently, rather than treating the array a..." 2013-08-23T13:19:59Z <p>Created page with &quot;A &#039;&#039;&#039;vectorized function&#039;&#039;&#039; is a basic MATLAB coding concept. It refers to a function that operates on each element of an array independently, rather than treating the array a...&quot;</p> <p><b>New page</b></p><div>A &#039;&#039;&#039;vectorized function&#039;&#039;&#039; is a basic MATLAB coding concept. It refers to a function that operates on each element of an array independently, rather than treating the array as a matrix and using matrix math. <br /> <br /> All user-supplied function in Rave must be vectorized. When Rave needs to evaluate multiple points using your functions, it sends all of those points to your function as an array in which each row of the array represents one point to be evaluated. <br /> <br /> Vectorizing a simple function in MATLAB usually entails replacing:<br /> * * with .* <br /> * / with ./ <br /> * ^ with .^<br /> <br /> The . in front of these operators tells MATLAB to apply the operator to each element of the array instead of treating the array like a matrix and using matrix math operations. Note that the + and - operators do not require a ., since matrix addition and subtraction already operates on each element individually. Similarly, most other built-in MATLAB functions do not require special vectorization. Examples include exp(), log(), and all the trig functions.<br /> <br /> For example, the function y = sin(x1)*x2^2 would be coded in MATLAB as y = sin(x1).*x2.^2<br /> <br /> <br /> See the [http://www.mathworks.com/help/matlab/matlab_prog/vectorization.html MATLAB Documentation] for more details.</div> Admin