Difference between revisions of "EQDEF"

From iMath
Jump to: navigation, search
(Created page with "{{Keyword | <code>@label@ { options } EQDEF [*] expression</code> | Define an equation. The expression must be of the form <code>expression1 = expression2</code>....")
 
Line 3: Line 3:
 
<code>@label@ { [[options]] } EQDEF [*] [[expression]]</code>  
 
<code>@label@ { [[options]] } EQDEF [*] [[expression]]</code>  
 
|
 
|
 +
2=
 
Define an equation. The [[expression]] must be of the form <code>expression1 = expression2</code>.  
 
Define an equation. The [[expression]] must be of the form <code>expression1 = expression2</code>.  
  
Line 9: Line 10:
 
For the special case of the equation label starting with <code>lib:</code>, the equation will not be erased by <code>[[CLEAREQUATIONS]]</code>. This is useful for building a library of generic equations.
 
For the special case of the equation label starting with <code>lib:</code>, the equation will not be erased by <code>[[CLEAREQUATIONS]]</code>. This is useful for building a library of generic equations.
 
|
 
|
 +
3=
 
<code>@y@ EQDEF y = 3 x + 4</code> creates the equation and stores it for later usage under the label <code>@y@</code>. iMath also remembers that the numeric value of <code>y</code> can be found from this equation provided that <code>x</code> is given a numeric value in some other equation.
 
<code>@y@ EQDEF y = 3 x + 4</code> creates the equation and stores it for later usage under the label <code>@y@</code>. iMath also remembers that the numeric value of <code>y</code> can be found from this equation provided that <code>x</code> is given a numeric value in some other equation.
  

Revision as of 09:12, 25 March 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.

See also

{{{4}}}