BASIC INTRODUCTION TO MATLAB
 

Basic Arithmetic
Trigonometry
Logarithms and Exponentials
Variables
Retrieving Variable Values
Saving and Loading
Recording Your Steps
Helpful Links
Retrieving Variable Values
How to Examples
How to:
If you want to find the value of a single variable, you can just type in that variable, and MATLAB will spit out its value.

But, what if you've been working on a long project and want to see the final result of a long list of variables. For this, MATLAB has the 'who' function. Just by typing 'who', MATLAB will return a list of all the variables you have assigned a value to since you began working and tell you their most recent value.

However, if we wanted to shut down MATLAB and remember our variables for another time, we would have to
save and load, which is covered in the next session.


Examples:
Let's say we've been working in MATLAB and have entered these commands:
     x = 4 + 3
     y = 2*4
     z = x
     X = 45
     y = -5
    
If, after this, we typed 'who' into MATLAB, it would return the following variables and values:
     X = 45
     x = 7
     y = -5
     z = 7