You are on page 1of 2

3/21/20 11:08 PM MATLAB Command Window 1 of 2

>> M=[5 0 ; 0 10];


>> K=[4 -2 ; -2 6];
>> Min=inv(M);
>> A=Min*K;
>> [V,D]=eig(A)

V =

0.8944 0.7071
-0.4472 0.7071

D =

1.0000 0
0 0.4000

>> pi1
Undefined function or variable 'pi1'.

>> mod1=V(1:2,2)

mod1 =

0.7071
0.7071

>> mod2=V(1:2,1)

mod2 =

0.8944
-0.4472

>> mod1t=mod1.'

mod1t =

0.7071 0.7071

>> mod2t=mod2.'

mod2t =

0.8944 -0.4472

>> mod1t*M*mod1

ans =

7.5000
3/21/20 11:08 PM MATLAB Command Window 2 of 2

>> lambda1=D(2,2)

lambda1 =

0.4000

>> lambda2=D(1,1)

lambda2 =

>> I=[1 0 ; 0 1]

I =

1 0
0 1

>> A-(lambda1*I)=
A-(lambda1*I)=

Error: Incorrect use of '=' operator. To assign a value to a variable, use '='. To
compare values for equality, use '=='.

>> A-(lambda1*I)

ans =

0.4000 -0.4000
-0.2000 0.2000

>> A1=ans

A1 =

0.4000 -0.4000
-0.2000 0.2000

>> adjA1=inv(A1)*det(A1)
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
4.625929e-17.

adjA1 =

0.2000 0.4000
0.2000 0.4000

>>

You might also like