A variable is a name
under which MathCad will store information.
Type
X:3
You will see
X:=3
Note that the := symbol is quite different from the plain = used in calculations. Always use : to obtain := when you are assigning a numerical value to a variable.
Type
Y:2
The value 3 has
been assigned to the variable X and the value 2 to the variable
Y. Any calculation below the assignments statements including these variables will automatically substitute 3 for X and 2 for Y.
Now type
2*X+Y=
Now type
A:3
B:4
C:1
B2 - 4AC
Now move to the right and above where you assigned values to A,B and C and type
discr=
(Make
sure and use the regular equals sign, not the colon.) You should get an error
message. Now drag the block containing discr= to a position below the definition of discr. This time you should get a number.
Here’s how MathCad is a like a spread sheet. Move
the cursor back up to where A is assigned the value 3 and change the value to 5.
Notice that the value calculated for discr has changed!