MATLAB is a very powerful and interactive software package for numerical computations. It is based upon matrices and m-files.
First, log on to your generic account {student} & {m4th4UD} . If you are unable to do that, please get a hold of me.
Open MATLAB and follow the bellow instructions. The text after the prompt (>>) represents a MATLAB command, and it should be typed in the Command Window. First, go to the home directory by typing (in the Command Window)
>> cd ~/
Then type
>> mkdir mywork (or whatever you wish to name this directory)
and
>> cd mywork
MATLAB can be used as a CALCULATOR. Try:
>>2^10
>> ans/2^8
MATLAB allows you to assign numerical values to a variable. Type
>> a=2, b=1
>> c=a +b
>> c=a + 2*b
>> c=a + 2*b;
>> c
If one ends a command by semi-column, MATLAB does its work ``silently'', but everything is still there.
MATLAB outputs numbers in various formats. Type,
>> c = sqrt(2)
>>format long
>> c
>> c =100* c
>>format
>>c
>>help format
Learn how to use the Command History (UP and DOWN arrow keys). Repeatedly pressing the ``UP Arrow'' key will review the previous commands. To re-execute a command, press the ``return'' key. Once a command is recalled it might be changed by using the ``left arrow'' and the ``right arrow'' keys.
Learn how to use MATLAB's extensive help.
The Reduced Row Echelon Form (RREF) of a matrix and rank
To enter the matrix A with the rows [0 1 1 1], [1 -1 0 1] and [2 -1 1 1], in the MATLAB command window type
>> A=[0 1 1 1; 1 -1 0 1; 2 -1 1 1] and then hit return
Next, type
>> rref(A)
>> rank(A)
After each command hit return. More to come...