SUBSTV: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Keyword | <code>SUBSTV ( expression | equation , variable = vector )</code> | 2= Substitute a vector of expressions in the expression/equation. The resu...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Keyword | {{Keyword | ||
| | | | ||
<code>SUBSTV ( [[expression]] | [[equation]] , [[ | 1= | ||
<code>SUBSTV ( [[expression]] | [[equation]] , [[equation]] | [[equation list]] )</code> | |||
| | | | ||
2= | 2= | ||
Substitute | For this special form of [[SUBST]], the equation(s) to be substituted must have the form <code>[[expression]] = [[vector]]</code>. | ||
Substitute the equation or the list of equations in the expression/equation with all values of the vector. All substitutions will be done in parallel (use [[SUBSTVC]] if this is not what you want). The result will be a vector. This is useful for specifying values to [[CHART]] or to [[ITERATE]]. | |||
| | | | ||
3= | 3= | ||
Line 10: | Line 13: | ||
| | | | ||
4= | 4= | ||
[[SUBST]] [[SUBSTC]] | [[SUBSTVC]] [[SUBST]] [[SUBSTC]] | ||
| | |||
5=2.2.0 or earlier for a single equation to substitute. From version 2.2.8 upwards, the second argument can be a list of equations | |||
}} | }} | ||
[[Category:Manipulation]] | [[Category:Manipulation]] |
Latest revision as of 18:48, 19 December 2018
Syntax
SUBSTV ( expression | equation , equation | equation list )
Implemented in iMath since version 2.2.0 or earlier for a single equation to substitute. From version 2.2.8 upwards, the second argument can be a list of equations.
Explanation
For this special form of SUBST, the equation(s) to be substituted must have the form expression = vector
.
Substitute the equation or the list of equations in the expression/equation with all values of the vector. All substitutions will be done in parallel (use SUBSTVC if this is not what you want). The result will be a vector. This is useful for specifying values to CHART or to ITERATE.
Example
EXDEF SUBSTV(cos{3 %theta}, %theta=0:2 %pi/3:%pi/6)
will result in the vector (1,0,-1,0,1)