Page 85 - MATLAB an introduction with applications
P. 85
70 ——— MATLAB: An Introduction with Applications
Column 2
–2.0715e – 001 – 5.2772e – 001i
7.1769e – 001
–3.3783e – 001 +2.2223e – 001i
Column 3
– 2.0715e – 001 + 5.2772e – 001i
7.1769e – 001
– 3.3783e – 001– 2.2223e – 001i
d =
Column 1
1.7686e + 001
0
0
Column 2
0
–3.4295e – 001 +1.0066e + 000i
0
Column 3
0
0
–3.4295e – 001 –1.0066e + 000i
Example E1.20: Determine the eigenvalues and eigenvectors of AB using MATLAB.
3 0 2 1 1 3 5 7
1 2 5 4 2 − 1 − 2 4
A = 7 − 126 ; B = 3 2 1 1
1 − 2 3 4 4 1 0 6
Solution:
% MATLAB Program
% The matrix “a” = A*B
>> A = [ 3 0 2 1; 1 2 5 4; 7 –1 2 6; 1 –2 3 4 ];
>> B = [ 1 3 5 7; 2 –1 –2 4; 3 2 1 1; 4 1 0 6 ];
>> a = A*B
a =
13 14 17 29
36 15 6 44
35 32 39 83
22 15 12 26
>> eig (a)
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09