Page 77 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 77

2. Probability and Random Process                                 65

           1.2      M-file for Independent Component Analysis

              ___________________________________________________________
              icagv.m

              %ICA WITH THREE COMPONENTS

              close all
              clear all
              i=0:1/10:1000;
              a=sin(0.1*pi*i);
              a=a(1:1:10000);
              a=meanvarnorm(a,0,1)
              b=randn(1,10000);
              b=meanvarnorm(b,0,1);
              i=0:1/10:1000;
              c=exp(0.001*pi*i);
              c=meanvarnorm(c,0,1);
              c=c(1:1:10000);
              s1=0.9*a+0.6*b+0.6*c;
              s1=meanvarnorm(s1,0,1);
              s2=0.6*a+0.9*b+0.6*c;
              s2=meanvarnorm(s2,0,1);
              s3=0.6*a+0.6*b+0.9*c;
              s3=meanvarnorm(s3,0,1);
              figure
              subplot(3,1,1)
              plot(a);
              subplot(3,1,2)
              plot(b);
              subplot(3,1,3)
              plot(c);
              figure
              subplot(3,1,1)
              plot(s1);
              subplot(3,1,2)
              plot(s2);
              subplot(3,1,3)
              plot(s3);
              %ICA START
              data1=[s1;s2;s3];
              MEANMAT=repmat(mean(data1')',1,length(data1));
   72   73   74   75   76   77   78   79   80   81   82