Evaluate (Advanced)

Top  Previous  Next

Sometimes you will want to enter strings which should be displayed rather than calculated. You might, for example, define the following parameter.


$p="3sin 60 - 4cos 45"


The quotes tell our equation editor to just display the string and do not perform any calculations.


Wrapping a string in braces will NOT cause it to be calculated - it is still a string and will be displayed as such. This allows you to include strings in calculations, particularly using the if command.


{if(d=0,"Undefined",n/d)}        This command shows the division of n by d unless d is 0. If d = 0, the if command will display the string "Undefined".


The evaluate command allows you to evaluate a string despite the quotes.


{evaluate($p)} = 5.426503


It is unlikely that you will need to use the evaluate command.