EQDEF: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
<code>@lib:pythagoras@ EQDEF c^2 = a^2 + b^2</code> creates the equation and stores it permanently. It can then be used by substituting values for <code>a</code> and <code>b</code> into it and solving for <code>c</code>. | <code>@lib:pythagoras@ EQDEF c^2 = a^2 + b^2</code> creates the equation and stores it permanently. It can then be used by substituting values for <code>a</code> and <code>b</code> into it and solving for <code>c</code>. | ||
|4= | |4= | ||
[[CONSTDEF]] | [[CONSTDEF]] [[EXDEF]] | ||
}} | }} | ||
[[Category:Definition]] | [[Category:Definition]] |
Latest revision as of 19:04, 27 June 2017
Syntax
@label@ { options } EQDEF [*] expression
Implemented in iMath since version 2.2.0 or earlier.
Explanation
Define an equation. The expression must be of the form expression1 = expression2
.
The starred form will suppress printing of the result.
For the special case of the equation label starting with lib:
, the equation will not be erased by CLEAREQUATIONS
. This is useful for building a library of generic equations.
Example
@y@ EQDEF y = 3 x + 4
creates the equation and stores it for later usage under the label @y@
. iMath also remembers that the numeric value of y
can be found from this equation provided that x
is given a numeric value in some other equation.
@lib:pythagoras@ EQDEF c^2 = a^2 + b^2
creates the equation and stores it permanently. It can then be used by substituting values for a
and b
into it and solving for c
.