EQDEF: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
<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= | |||
[[CONSTDEF]] | |||
}} | }} | ||
[[Category:Definition]] | [[Category:Definition]] |
Revision as of 16:07, 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
.