matlab_wilhelp.doc

advertisement
cat matlab.help
To activate matlab enter:
matlab
**** matlab v7 V14 is : /usr/local/matlab7/bin/matlab
To save a copy of the work done in matlab do:
1. inside matlab enter:1. diary junk1
2. diary on
.
.
work done in matlab
.
.
diary off
quit
now a file named "junk1" in ascii should be in your directory.
to run BATCH jobs do:
>>test
where test.m is the accii file.
TO save the answers do:
test ( run)
2. save matout
3. clear
3a. whos
4. load matout
this saves the output in the binary format.
Example of matrix inversion:
>> b= [1 1 1
123
1 2 6y =
3
>> z=det(b)
z=
3
>>
TO create and run mfile:
****************************************************
1. create the file such as mat.m, which is a simple 2 by 2 matrix.
2. enter: matlab -r mat, this creates an A matrix.
3. To for example find the inverse of this matrix enter, inv(A). THis gives you the
inverse of A.
Or when confun is entered instead of mat, then if user enters c, the result of c = 19.7500
will appear on the screen.
]
b=
1
1
1
1
2
2
1
3
6
>> y=det(b)
Download