Professional Documents
Culture Documents
>> A = [314 628 942 1258 157; 628 98596 1 1 1; 942 1 98596 1 1; 1258 1 1 98596 1; 1570 1 1 1 314]
A=
a)
>> B = A* (A +A')
B=
1.0e+010 *
>> C = inv(A)
C=
D=
-1.5045e+020
b)
>> E = A+1
E=
629 98597 2 2 2
943 2 98597 2 2
1259 2 2 98597 2
1571 2 2 2 315
>> F= 2*A
F=
1256 197192 2 2 2
1884 2 197192 2 2
2516 2 2 197192 2
3140 2 2 2 628
>> G = [A E; E F]
G=
Columns 1 through 7
Columns 8 through 10
2 2 2
98597 2 2
2 98597 2
2 2 315
2 2 2
197192 2 2
2 197192 2
2 2 628
Q.2. The system can be stated as the matrix equation A*x = b Multiplying each side from
the left by the inverse of the matrix A will give,
((inv(A))*A)*x = (inv(A))*b
But a matrix multiplied by its inverse from the right or left gives an identity matrix I with ones
on the diagonal and zeros elsewhere, so that ,
((inv(A))*A)*x = I*x = x
>> b = [1;1;1;1;1]
b=
>> X = (inv(A))*b
X=
-0.0009
0.0000
0.0000
0.0000
0.0079
Z5 = 0.0079
Q.3. >> H = hilb(5)
H=
Q.4.
a)
>> Q = H*H*H*H*H
Q=
>> P = H*H*H*H
P=
R=
>> S = H*H
S=
>> T = [1 2 2 2 2 ; 0 1 2 2 2; 0 0 1 2 2; 0 0 0 1 2; 0 0 0 0 1]
T=
1 2 2 2 2
0 1 2 2 2
0 0 1 2 2
0 0 0 1 2
0 0 0 0 1
>> Y = T+Q+P+R+S+H
Y=
b)
I. >> Y(5,4)
ans =
1.2939
Q.5.
Q=
1.0e+004 *
0 0 0 -7.7344 0.0207
0 0 0 0 -0.0098