cao method code error
6 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I'm trying to write this code for finding minimum embedding dimension with Cao method.In spite of working hard, i could't achieve right results or where the error was.Could anyone help me?
x=1:10;
tao=1;
N=length(x);
mmax=3;
for m=1:mmax-1
M=N-m*tao;
Y=psr_deneme(x,m,tao,M);%Phase space reconstruction of time series x Y=Mxm matrix
a=0;
for n=1:M
y0=ones(M,1)*Y(n,:);
distance=max(abs(Y-y0),[],2);
[neardis nearpos]=sort(distance);
newpoint=[Y(n,:) x(n+m*tao)];
newneig=[Y(nearpos(2),:) x(nearpos(2)+m*tao)];
R1=max(abs(newpoint-newneig),[],2);
a=a+R1/neardis(2);
end
E(m)=a/M;
end
E1(m)=E(2:end)/E(1:end-1);
plot(1:length(E1),E1)
2 个评论
Walter Roberson
2012-5-17
What difference do you observe between what you expect and what you observe?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Financial Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!