>>
cd f:at the prompt. This will connect you to your Unix home directory!
dirat the prompt. You will be able to see only those files whose names are upto eight characters long and whose extensions are upto three characters long. (Eg. hello.txt , matlab.hw , ECH4323 )
expomapat the prompt. This will take you through a series of step-by-step instructions on using Matlab. Once you go through this, you will be able to make your own function and script files.
1 2The solution is given in this sample called hw3pb1a.m. You can save this file in your directory as follows:
3 4
hw3pb1aThis should give an output that looks like this...
Determinant d = -2 Inverse b = -2.0000 1.0000 1.5000 -0.5000 Eigenvalues e = -0.3723 5.3723 >>
>> sqr(4) ans = 16 >>
>> a=[1 2 3 4]; >> b=sqr(a) b = 1 4 9 16 >>
>> a=[1 2;3 4]; >> sqr(a) ans = 1 4 9 16 >>