Difference between revisions of "Mathematical Expressions"
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | == Introduction == | |
− | + | Generally arithmetic operators and distinct values need to be typed by hand while variables can be chosen from the menu opening by hitting the blue rectangle on the ‘Expression’ line. The benefit is: Only existing variables are used and the curly braces plus the ‘lv=’ or ‘v=’ in case of a global variable is typed automatically. | |
+ | </pre> | ||
− | + | ===<p><b>Some Examples</b></p>=== | |
− | |||
− | To add | + | To add local variables A and B and store the result in C open ‘? Set Variable’ (C) there select 'Expression' and select via the blue rectangle first 'A' then type '+' and next select 'B'.<br>Finally the line reads: {lv=A}+{lv=B}. |
− | |||
+ | To add 130 to C the command in the ‘Action Window’ should read as:<br> | ||
+ | ''' ? Set Variable '''<br> | ||
+ | C:{lv=C}+130 or C:{lv=C}+1.3E2 using scientific notation. | ||
− | C: ({lv=A}^{lv=B}+20)^0.5 | + | To calculate the square root of (A to the power of B plus 20):<br> |
− | In | + | ''' ? Set Variable '''<br> |
+ | C: ({lv=A}^{lv=B}+20)^0.5<br> | ||
+ | with A=2, B=3 the result is C=5.29 | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | ===<p><b>Trigonometric functions</b></p>=== | ||
+ | |||
+ | Normal functions as SIN(x), COS(x), TAN(x) and COT(x) need x as input argument in degree. The reverse functions of above are named ASIN(x), ACOS(x), ATAN(x) and ACOT(x) and deliver degrees as output. | ||
+ | |||
+ | The functions ending with R as SINR(x) will need x in radians as input respectively deliver as output radians as ASINR(x) does. | ||
+ | </pre> | ||
+ | |||
+ | ===<p><b>Example</b></p>=== | ||
+ | |||
+ | If the argument of a function is stored in local variable A and the result should show up in local variable C then open variable A and give it the desired value say 0.5 then open variable C, there select ‘Expression’ and write as example ASINR. Now open the blue rectangle and select the variable (A in this case). Thereafter ASINR{lv=A} is displayed In the 'Set C' window. Back in the main window the following is displayed:<br> | ||
+ | ''' ? Set Variable '''<br> | ||
+ | C:ASINR({lv=A})<br> | ||
+ | In the 'Local Variables' window C is given the value of 0.525 (rad) |
Latest revision as of 13:45, 11 January 2024
Introduction
Generally arithmetic operators and distinct values need to be typed by hand while variables can be chosen from the menu opening by hitting the blue rectangle on the ‘Expression’ line. The benefit is: Only existing variables are used and the curly braces plus the ‘lv=’ or ‘v=’ in case of a global variable is typed automatically.
Some Examples
To add local variables A and B and store the result in C open ‘? Set Variable’ (C) there select 'Expression' and select via the blue rectangle first 'A' then type '+' and next select 'B'.
Finally the line reads: {lv=A}+{lv=B}.
To add 130 to C the command in the ‘Action Window’ should read as:
? Set Variable
C:{lv=C}+130 or C:{lv=C}+1.3E2 using scientific notation.
To calculate the square root of (A to the power of B plus 20):
? Set Variable
C: ({lv=A}^{lv=B}+20)^0.5
with A=2, B=3 the result is C=5.29
Trigonometric functions
Normal functions as SIN(x), COS(x), TAN(x) and COT(x) need x as input argument in degree. The reverse functions of above are named ASIN(x), ACOS(x), ATAN(x) and ACOT(x) and deliver degrees as output.
The functions ending with R as SINR(x) will need x in radians as input respectively deliver as output radians as ASINR(x) does.
Example
If the argument of a function is stored in local variable A and the result should show up in local variable C then open variable A and give it the desired value say 0.5 then open variable C, there select ‘Expression’ and write as example ASINR. Now open the blue rectangle and select the variable (A in this case). Thereafter ASINR{lv=A} is displayed In the 'Set C' window. Back in the main window the following is displayed:
? Set Variable
C:ASINR({lv=A})
In the 'Local Variables' window C is given the value of 0.525 (rad)