Page 78 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 78
66 Chapter 2
c1=cov(data1');
[T1,E1]=eig(c1);
data2=T1'*(data1-MEANMAT);
%data2=T1*(data1);
c2=cov(data2');
[T2,E2]=eig(c2);
data=E2^(-1/2)*data2;
T=E2^(-1/2)*T1;
c=cov(data');
figure
subplot(3,1,1)
plot(data(1,:));
subplot(3,1,2)
plot(data(2,:));
subplot(3,1,3)
plot(data(3,:));
%ICA STARTS
w11=rand(1);
w12=rand(1);
w13=rand(1);
w21=rand(1);
w22=rand(1);
w23=rand(1);
w31=rand(1);
w32=rand(1);
w33=rand(1);
W1=[w11 w21 w23]';
W2=[w12 w22 w32]';
W3=[w13 w23 w33]';
W=[W1 W2 W3]';
W = W * real(inv(W' * W)^(1/2));
w11=W(1,1);
w12=W(1,2);
w13=W(1,3);
w21=W(2,1);
w22=W(2,2);
w23=W(2,3);
w31=W(3,1);
w32=W(3,2);
w33=W(3,3);
for i=1:1:40000
w11=sum(((w11*data(1,:)+w21*data(2,:)+w31*data(3,:)).^3).*data(1,:))/length(data);