(混沌相空间)CC方法重构相空间,程序的不出来结果,求大神...
运用论坛里的方法,想做一个重构相空间的程序,可是也得出了跟论坛上的相同的结果,进行不下去了,也没有回复,现在把结果贴出来,求大神指导啊!输入的数据是data=,之前变换成行向量,也是这样的结果的,问题不知道出在哪了,求大神相助!data =
0.2483
0.1337
0.0993
0.1648
0.2303
0.2967
0.3504
0.2319
0.1627
0.0941
0.0523
0.0469
0.0944
0.0698
t =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
i =
1
t =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
i =
2
i =
1
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
2
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
1
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
2
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
1
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
2
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
1
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
2
Warning: Divide by zero.
> In correlation_integral at 19
In Untitled3 at 17
i =
1
??? One or more output arguments not assigned during call to 'C:\Users\Administrator\Desktop\新建文件夹 (2)\Chaos Toolbox Ver.2.0\Main\reconstitution.m (reconstitution)'.
??? Index exceeds matrix dimensions.
在工具箱里有reconstitution文件呢,急求啊!!!
不是文件的问题,是你调用函数时未给输出变量赋值,还有就是下标索引超出矩阵大小,建议你一步一步调试一下 chybeyond 发表于 2014-7-25 19:38
不是文件的问题,是你调用函数时未给输出变量赋值,还有就是下标索引超出矩阵大小,建议你一步一步调试一下
你好,调用函数时为给变量赋值,可是这个变量我找不到是哪个需要赋值呀,我把我的程序贴出来,求大神给看下,该怎么弄,新手,完全都搞不明白呢,谢谢了!
clear all;
% data=load('此处为载入数据的存放地址');% 载入数据
data=
N=length(data);
max_d=20;%the maximum value of the time delay
sigma=std(data);%calcute standard deviation s_d
for t=1:max_d
t
s_t=0;
delt_s_s=0;
for m=2:5
s_t1=0;
for j=1:4
r=sigma*j/2;
data_d=disjoint(data,N,t);%将时间序列分解成t个不相交的时间序列
=size(data_d);
s_t3=0;
for i=1:t
i
Y=data_d(i,:);
C_1(i)=correlation_integral(Y,N_d,r);%计算C(1,N_d,r,t)
X=reconstitution(Y,N_d,m,t);%相空间重构
N_r=N_d-(m-1)*t;
C_I(i)=correlation_integral(X,N_r,r);%计算C(m,N_r,r,t)
s_t3=s_t3+(C_I(i)-C_1(i)^m);%对t个不相关的时间序列求和
end
s_t2(j)=s_t3/t;
s_t1=s_t1+s_t2(j);%对rj求和
end
delt_s_m(m)=max(s_t2)-min(s_t2);%求delt S(m,t)
delt_s_s=delt_s_s+delt_s_m(m);%delt S(m,t)对m求和
s_t0(m)=s_t1;
s_t=s_t+s_t0(m);%S对m求和
end
s(t)=s_t/16;
delt_s(t)=delt_s_s/4;
s_cor(t)=delt_s(t)+abs(s(t));
end
fid=fopen('result.txt','w');
fprintf(fid,'%f %f %f %f/n',t,s(t),delt_s(t),s_cor(t));
fclose(fid);
t=1:max_d;
plot(t,s,t,delt_s,'.',t,s_cor,'*') chybeyond 发表于 2014-7-25 19:38
不是文件的问题,是你调用函数时未给输出变量赋值,还有就是下标索引超出矩阵大小,建议你一步一步调试一下
也调试了,在程序中没有出现进行不下去的地方呢?是调试出现了问题?还是数据的问题? 看下
5.建议提问的网友分清 编程问题 和 专业问题 http://forum.vibunion.com/thread-36746-1-1.html
6.提问的智慧!!!!(发帖前请认真阅读) http://forum.vibunion.com/thread-21991-1-1.html
页:
[1]