Here Is the first tutorial
Let us start with the general structure of Matlab
1) Current directory = where you will save your files related to matlab
2) Command Window = where you will give command to Matlab
for ex. type the following ans see what happens
2+2
3) Work space = Your variables will store here
4) Command History = Your all previous commands will store here .
Now try to perform all the simple mathematical operation in the command window
"* " ,"/" ,"-" ,"+"
MatLab actually stands for Matrix Laboratory
so as it name indicates it perform all its operations in the form of Matrices
so now we will learn to solve matrix
write the following code in command window
>> a = [1 2 3; 4 5 6 ;7 8 9 ]
after pressing the enter you will get this
a
=
1 2 3
4 5 6
7 8 9
let second matrix be
b = [3 4 5;6 7 8; 9 0 8 ];
(note that I used semicolon here just to compress the output in Matlab semicolon does not have any meaning except to compress the output )
now
>> c = a+b
and you will get your answer .
Now the reader must try all the possible operations by him/her self............for further help use Matlab help
also note the change in workspace and command history ..........
Thank You for reading

No comments:
Post a Comment