%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   ICAshow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[sig,matrix]=demosig();
figure;
 subplot(4,1,1);
 plot(sig(1,:));
 title('source 1');
 subplot(4,1,2);
plot(sig(2,:));
 title('source 2');
 subplot(4,1,3);
plot(sig(3,:));
 title('source 3');
 subplot(4,1,4);
plot(sig(4,:));
 title('source 4');

figure;
 subplot(4,1,1);
 plot(matrix(1,:));
 title('mix 1');
 subplot(4,1,2);
plot(matrix(2,:));
 title('mix 2');
 subplot(4,1,3);
plot(matrix(3,:));
 title('mix 3');
 subplot(4,1,4);
plot(matrix(4,:));
 title('mix 4');

figure;
A=ones(4)/4;
[icasig, A, W] = image_ica_debug (matrix, 'g','pow3','initGuess',A,'epsilon',0.0001,'maxFinetune',3);
