Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Question 2:

b)
>> B = [4 6 8; 16 23 30; -12 -20 -32]
B=
4
16

6
23

8
30

-12 -20 -32

>> y= inv(B)
y=
-8.5000

2.0000 -0.2500

9.5000 -2.0000
-2.7500

0.5000

0.5000 -0.2500

c)
>> B = [4 6 8; 16 23 30; -12 -20 -32]
B=
4
16

6
23

8
30

-12 -20 -32

>> y= inv(B)
y=
-8.5000

2.0000 -0.2500

9.5000 -2.0000
-2.7500

0.5000

0.5000 -0.2500

>> X = [4 6 8]

X=
4

>> n = norm(X)

% n is the spectral norm of B%

n=
10.7703

>> Y = [-8.5 2 -0.25]


Y=
-8.5000

2.0000 -0.2500

>> m = norm(Y)
m=
8.7357

>> cond_B= n*m


cond_B =

94.0864

>>

% m is the spectral norm of B-1%

You might also like