cao method code error
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 17 Mai 2012
What difference do you observe between what you expect and what you observe?
Réponses (0)
Voir également
Catégories
En savoir plus sur Assembly dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!