
%icabasisforspeech.m
function [W]=icabasisforspeech(DATA1)
temp=cell2mat(DATA1);
[E,D]=eig(cov(temp'));
E=E*D^(-1/2);
D1=D/max(max(D));
[P,Q]=find(D1>0.01);
E=E(:,P(length(P)):-1:P(1));
M=mean(temp')';
Y=real(E'*(temp-repmat(M,1,size(temp,2))));
CY=cov(Y');
check=1;
while(check==1)
W=rand(size(CY,1),size(CY,2));
if(rank(W)==size(CY,1))
W=gram(W')';
check=0;
end
end
for iteration=1:1:1
for i=1:1:size(W,1)
for j=1:1:size(W,2)
s1=0;
for k=1:1:size(Y,2)
s=0;
for l=1:1:size(Y,1)
s=s+(W(i,l)*Y(l,k))
end
s1=s1+(s^3)*Y(j,k);
end
W(i,j)=s1/(size(Y,1)*size(Y,2));
end
end
W=gram(W')' ;
end