Professional Documents
Culture Documents
4)(12)
>> A=[0 0 -7 1;0 0 5 0;-7 5 0 2;1 0 2 0]
A=
-7
-7
>> rank(A)
ans =
4
--------------------------------------------------------------------------------------------------------------------------------Problem (7.7)(14)
>> A=[1 -2 0 0;4 3 5 0;0 2 7 5;0 0 2 4]
A=
-2
>> det(A)
ans =
158
-----------------------------------------------------------------------------------------------------------------------------------------
Problem (7.8)(6)
>> A=[29,-11,10;-160,61,-55;55,-21,19]
A=
29 -11
10
-160 61 -55
55 -21
19
>> inv(A)
ans =
1.0000 -5.0000
5.0000
4.0000 9.0000
-------------------------------------------------------------------------------------------------------------------------------------------------------Problem (8.1)(19)
>> A=[13 5 2;2 7 -8;5 4 7]
A=
13
-8
>> [V,D]=eig(A)
V=
0.6667
0.6667
0.6667
D=
9.0000 + 0.0000i
0
9.0000 - 0.0000i
9.0000
----------------------------------------------------------------------------------------------------------------------------------------------------------Problem (9.4)(10)
%% Problem 9.4(10)
%%The function represents elliptic cylinders with verticsl generating
%%straight lines
%% x^2+4*y^2=c
%%x^2/4+y^2=c/4
x=[-8:0.1:8];
y=[-8:0.1:8];
[x,y]=meshgrid(x,y);
f=x.^2+y.^2/4;
figure(1)
mesh(f,x,y)
figure(2)
surf(f)
Figure(1)
350
300
250
200
150
100
50
0
8
6
4
8
6
2
-2
0
-2
-4
-4
-6
-8
-6
-8
Figure(2)
350
300
250
200
150
100
50
0
180
160
140
120
100
120
80
60
40
20
0
20
40
60
80
100
%% Problem 9.7(6)
%%The function represents circular surfaces with centre(3,1)
%% (x-3)^2+(y-1)^2=c
x=[-10:0.1:10];
y=[-10:0.1:10];
[x,y]=meshgrid(x,y);
f=(x-3).^2+(y-1).^2;
figure(1)
mesh(x,y,f)
figure(2)
surf(f)
140
160
180
figure(1)
300
250
200
150
100
50
0
10
8
6
4
2
0
-2
-4
-6
-8
-10
-10
-8
-6
-4
-2
10
figure(2)
300
250
200
150
100
50
0
250
200
250
150
200
150
100
100
50
50
0