Azzera filtri
Azzera filtri

cao method code error

6 visualizzazioni (ultimi 30 giorni)
mirwais
mirwais il 17 Mag 2012
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 Commenti
Walter Roberson
Walter Roberson il 17 Mag 2012
What difference do you observe between what you expect and what you observe?
mirwais
mirwais il 18 Mag 2012
I observe a straight line but i expect that the line E1(m) stops changing when m is greater
than some value m0.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Financial Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by