www.pudn.com > ica_demo.rar > demo.m


load mixture;
disp('A mixture of 2 sine waves');
subplot(3,1,1),plot([x1,x2]);
disp('Now mix them');
pause;
subplot(3,1,2),plot(x);
disp('Now run ICA on these');
pause;
[z,Wt,W] = icacovb(x',0.01,'y');
subplot(3,1,3), plot(atanh(-z));
pause;
disp('Now some EEG signals');
clf;
clear;
load eeg_eg;
subplot(3,1,1),plot([x1,x2]);
disp('Now mix them');
disp('(they are also normalised to zero mean, unit std)');
pause;
subplot(3,1,2),plot(x);
disp('Now run ICA on these');
pause;
[z,Wt,W] = icacovb(x',0.01,'y');
subplot(3,1,3), plot(atanh(-z));
disp('and the scatterplots of estimates vs originals');
pause;
subplot(2,2,1),plot(atanh(-z(:,1)),x1,'.');
subplot(2,2,2),plot(atanh(-z(:,1)),x2,'.');
subplot(2,2,3),plot(atanh(-z(:,2)),x1,'.');
subplot(2,2,4),plot(atanh(-z(:,2)),x2,'.');
pause;
disp('End of demo');
clear;