[go: up one dir, main page]

0% found this document useful (0 votes)
43 views4 pages

Exercices Et TP (ACP)

Uploaded by

Abdilghani Zahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views4 pages

Exercices Et TP (ACP)

Uploaded by

Abdilghani Zahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Exercice(1):(Matlab)

>> Y=xlsread('C:\Users\chil\Desktop\ACP\ACP_TP.xlsx',3)
G=mean(Y)
X=zeros(4,3)
e=std(Y,1)
for i=1:3 X(:,i)=(Y(:,i)-G(i))/e(i); end
Xcr=X
R=(Xcr'*Xcr)/4
[V,Vp]=eig(R)
It=trace(Vp)
I=Vp/It*100
for i=1:3 u(:,i)=Xcr*V(:,i);end
V
u
plot(u(:,1),u(:,2),'*')
plot(u(:,1),u(:,3),'*')
plot(u(:,2),u(:,3),'*')

Y =

1 0 0
1 2 0
2 2 2
0 0 2

G =

1 1 1

X =

0 0 0
0 0 0
0 0 0
0 0 0

e =

0.7071 1.0000 1.0000

Xcr =

0 -1.0000 -1.0000
0 1.0000 -1.0000
1.4142 1.0000 1.0000
-1.4142 -1.0000 1.0000

R =

1.0000 0.7071 0
0.7071 1.0000 0
0 0 1.0000
V =

-0.7071 0 0.7071
0.7071 0 0.7071
0 1.0000 0

Vp =

0.2929 0 0
0 1.0000 0
0 0 1.7071

It =

I =

9.7631 0 0
0 33.3333 0
0 0 56.9036

V =

-0.7071 0 0.7071
0.7071 0 0.7071
0 1.0000 0

u =

-0.7071 -1.0000 -0.7071


0.7071 -1.0000 0.7071
-0.2929 1.0000 1.7071
0.2929 1.0000 -1.7071

Exercice(2):(Matlab)
Y=xlsread('C:\Users\chil\Desktop\ACP\ACP_TP.xlsx',4)
G=mean(Y)
X=zeros(6,3)
e=std(Y,1)
for i=1:3 X(:,i)=(Y(:,i)-G(i))/e(i); end
Xcr=X
R=(Xcr'*Xcr)/6
[V,Vp]=eig(R)
It=trace(Vp)
I=Vp/It*100
for i=1:3 u(:,i)=Xcr*V(:,i);end
V
u
plot(u(:,1),u(:,2),'*')
plot(u(:,1),u(:,3),'*')
plot(u(:,2),u(:,3),'*')

Y =
1 0 0
0 0 1
0 1 2
2 2 1
1 0 0
2 3 2

G =

1 1 1

X =

0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

e =

0.8165 1.1547 0.8165

Xcr =

0 -0.8660 -1.2247
-1.2247 -0.8660 0
-1.2247 0 1.2247
1.2247 0.8660 0
0 -0.8660 -1.2247
1.2247 1.7321 1.2247

R =

1.0000 0.7071 0
0.7071 1.0000 0.7071
0 0.7071 1.0000

V =

0.5000 -0.7071 0.5000


-0.7071 -0.0000 0.7071
0.5000 0.7071 0.5000

Vp =

0.0000 0 0
0 1.0000 0
0 0 2.0000
It =

I =

0.0000 0 0
0 33.3333 0
0 0 66.6667

V =

0.5000 -0.7071 0.5000


-0.7071 -0.0000 0.7071
0.5000 0.7071 0.5000

u =

0.0000 -0.8660 -1.2247


-0.0000 0.8660 -1.2247
-0.0000 1.7321 -0.0000
0.0000 -0.8660 1.2247
0.0000 -0.8660 -1.2247
0 0.0000 2.4495

You might also like