Vous êtes sur la page 1sur 10

A=[-2 1 0;-1 0 1;0 0 -1]

A=

-2 1 0

-1 0 1

0 0 -1

>> [vecteurs_propres,valeurs_propres]=eig(A)

vecteurs_propres =

0.7071 -0.7071 0.7071

0.7071 -0.7071 0.7071

0 0 0.0000

valeurs_propres =

-1.0000 0 0

0 -1.0000 0

0 0 -1.0000

>> syms a

>> I=[a 0 0;0 a 0;0 0 a]

I=

[ a, 0, 0]

[ 0, a, 0]

[ 0, 0, a]
>> det(A-I)

ans =

- a^3 - 3*a^2 - 3*a - 1

>> inv(I-A)

ans =

[ a/(a^2 + 2*a + 1), 1/(a^2 + 2*a + 1), 1/(a^3 + 3*a^2 + 3*a + 1)]

[ -1/(a^2 + 2*a + 1), (a + 2)/(a^2 + 2*a + 1), (a + 2)/(a^3 + 3*a^2 + 3*a + 1)]

[ 0, 0, 1/(a + 1)]

>> C=[1 1 0]

C=

1 1 0

>> B=[1;0;2]

B=

>> C*inv(I-A)*B
ans =

a/(a^2 + 2*a + 1) - 1/(a^2 + 2*a + 1) + 2/(a^3 + 3*a^2 + 3*a + 1) + (2*(a + 2))/(a^3 + 3*a^2 + 3*a + 1)

>> det(I-A)

ans =

a^3 + 3*a^2 + 3*a + 1

>> ctrb(A;B)

ctrb(A;B)

Error: Unbalanced or unexpected parenthesis or bracket.

>> ctrb(A,B)

ans =

1 -2 5

0 1 0

2 -2 2

>> syms R1 R2 R3

>> R=[R1 R2 R3]

R=

[ R1, R2, R3]

>> I-A-(B*R)
ans =

[ a - R1 + 2, - R2 - 1, -R3]

[ 1, a, -1]

[ -2*R1, -2*R2, a - 2*R3 + 1]

>> det(I-A-(B*R))

ans =

3*a - 3*R2 - 2*R3 - 2*R1 - R1*a - R2*a - 4*R3*a - R1*a^2 - 2*R3*a^2 + 3*a^2 + a^3 + 1

>> AC=[0 1 0;0 0 1;-1 -3 -3]

AC =

0 1 0

0 0 1

-1 -3 -3

>> BC=[0;0;1]

BC =

>> det(I-A-(B*R))
ans =

3*a - 3*R2 - 2*R3 - 2*R1 - R1*a - R2*a - 4*R3*a - R1*a^2 - 2*R3*a^2 + 3*a^2 + a^3 + 1

>> det(I-A+(B*R))

ans =

2*R1 + 3*R2 + 2*R3 + 3*a + R1*a + R2*a + 4*R3*a + R1*a^2 + 2*R3*a^2 + 3*a^2 + a^3 + 1

>> det(I-AC+(BC*R))

ans =

R1 + 3*a + R2*a + R3*a^2 + 3*a^2 + a^3 + 1

>> P=[2 3 1;3 1 0;-2 0 2]

P=

2 3 1

3 1 0

-2 0 2

>> Rc=[26 24 6]

Rc =

26 24 6

>> Rc*inv(P)
ans =

6.6667 4.0000 -0.3333

>> I-A+(B*R)

ans =

[ R1 + a + 2, R2 - 1, R3]

[ 1, a, -1]

[ 2*R1, 2*R2, 2*R3 + a + 1]

>> vecteurs_propres

vecteurs_propres =

0.7071 -0.7071 0.7071

0.7071 -0.7071 0.7071

0 0 0.0000

>> Rc*inv(P)

ans =

6.6667 4.0000 -0.3333

>> Rc*inv(vecteurs_propres)

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.232595e-
32.
ans =

1.0e+32 *

-0.0000 0.0000 1.4342

>> QQ=[0 1 0 0 0;0 0 40 0 0;0 0 0 1 0;0 0 0 0 -1]

QQ =

0 1 0 0 0

0 0 40 0 0

0 0 0 1 0

0 0 0 0 -1

>> [vecteurs_propres,valeurs_propres]=eig(QQ)

Error using eig

Input matrix must be square.

>> QQ=[0 1 0 0 0;0 0 40 0 0;0 0 0 1 0;0 0 -5 0 0;0 0 0 0 -1]

QQ =

0 1 0 0 0

0 0 40 0 0

0 0 0 1 0

0 0 -5 0 0

0 0 0 0 -1

>> [vecteurs_propres,valeurs_propres]=eig(QQ)
vecteurs_propres =

1.0000 + 0.0000i -1.0000 + 0.0000i 0.0000 + 0.4051i 0.0000 - 0.4051i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i -0.9058 + 0.0000i -0.9058 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 - 0.0506i 0.0000 + 0.0506i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.1132 + 0.0000i 0.1132 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 1.0000 + 0.0000i

valeurs_propres =

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 2.2361i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 - 2.2361i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.0000 + 0.0000i

>> BB=[0;0.001;0;0.0001;100]

BB =

0.0010

0.0001

100.0000

>> ctrb(AA,BB)

Undefined function or variable 'AA'.

>> ctrb(QQ,BB)
ans =

0 0.0010 0 0.0040 0

0.0010 0 0.0040 0 -0.0200

0 0.0001 0 -0.0005 0

0.0001 0 -0.0005 0 0.0025

100.0000 -100.0000 100.0000 -100.0000 100.0000

>> (a+1)^3*(a^2+0.28*a+0.04)

ans =

(a + 1)^3*(a^2 + (7*a)/25 + 1/25)

>> II=(a 0 0 0 0;0 a 0 0 0;0 0 a 0 0;0 0 0 a 0;0 0 0 0 a]

II=(a 0 0 0 0;0 a 0 0 0;0 0 a 0 0;0 0 0 a 0;0 0 0 0 a]

Error: Unexpected MATLAB expression.

>> II=[a 0 0 0 0;0 a 0 0 0;0 0 a 0 0;0 0 0 a 0;0 0 0 0 a]

II =

[ a, 0, 0, 0, 0]

[ 0, a, 0, 0, 0]

[ 0, 0, a, 0, 0]

[ 0, 0, 0, a, 0]

[ 0, 0, 0, 0, a]

>> syms R1 R2 R3 R4 R5
>> RRR=[R1 R2 R3 R4 R5]

RRR =

[ R1, R2, R3, R4, R5]

>> det(II-QQ+(BB*RRR))

ans =

(9*R1)/1000 + (9*R1*a)/1000 + (9*R2*a)/1000 + (R1*a^2)/1000 + (R1*a^3)/1000 + (9*R2*a^2)/1000


+ (R2*a^3)/1000 + (R3*a^2)/10000 + (R2*a^4)/1000 + (R3*a^3)/10000 + (R4*a^3)/10000 +
500*R5*a^2 + (R4*a^4)/10000 + 100*R5*a^4 + 5*a^2 + 5*a^3 + a^4 + a^5

>>

Vous aimerez peut-être aussi