ICA算法程序
function [ys,W]=SNR_Max(x)for k=1:1000;
s1=sin(0.011*k);
s2=sin(0.011*k);
zc=[s1,s2];
A=[1.5 1;1 1.4];
x=zc*A;
[n,T]=size(x);
x=x-mean(x')'*ones(1,T);
[F,D]=eig((x*x')/T);
v=F*(D^(-0.5))*F';
x=v*x;
p=80;
a=ones(1,p)/p;
x=x';
S=filter(a,1,x);
U=cov(S-x,1);
V=cov(x,1);
[W d]=eig(V,U);
ys=(x*W)';
mplot(zc);
mplot(x);
figure(2);
mplot(ys);
function mplot(s)
[dim,sample]=size(s);
for k=1:dim
suplot(dim,1,k);
plot(s(k,:));
plot(s(:,k));
axis('tight');
set(gca,'XTick',[]);
end
运行时总是显示画图函数有问题 :Illegal use of reserved keyword "function".请各位大侠指教
谢谢