Example of Variables and assignment statements:
The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in the Command Window:
>> mynum = 6
Here, the user typed mynum = 6 at prompt, and the MATLAB stored integer 6 in the variable known as mynum, and then exhibit the result followed by the prompt again. As the equal sign is an assignment operator, and it does not mean equality, the statement must be read as 'mynum gets the value of 6' (not 'mynum equals 6').
Note that the variable name should always be on the left, and the expression on the right side. An error will take place if these are reversed.
>> 6 = mynum
??? 6 = mynum