声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1118|回复: 0

[分形与混沌] 急救阿,看看问题出在那,作业啊回不了家了

[复制链接]
发表于 2009-1-7 11:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
数据:data :
527
1160
706
1760
2340
1110
732
537
522
880
654
1040
370
2220
980
285
184
1060
402
350
641
364
152
464
532
600
446
765
506
840
635
590
1050
838
1280
480
3200
2200
781
1640
578
643
652
220
1270
561
1620
770
717
972
104
694
742
344
948
109
程序:
clc
clear all
close all
%--------------------------------------------------------------------------
data = load('d:\c.txt');
%
时间序列(列向量)
%--------------------------------------------------------------------------
%-----------------------------------------------------------------
%计算参数

N=length(data);

%
时间系列长度
tau =10;
%
时间延迟
min_m= 4;
%
最小嵌入维
max_m=10;
%
最大嵌入维
ss = 11;
%
计算r的步长
for m=min_m:max_m
    Y=reconstitution(data,N,m,tau);%reconstitute state space
    M=N-(m-1)*tau;%the number of points in state space
    for i=1:M-1
        for j=i+1:M
            d(i,j)=max(abs(Y(:,i)-Y(:,j)));%calculate the distance of each two           
        end                                %points in state space  
计算状态空间中每两点之间的距离
    end
    max_d=max(max(d));%the max distance of all points   
得到所有点之间的最大距离
    d(1,1)=max_d;
    min_d=min(min(d));%the min distance of all points   
得到所有点间的最短距离
    delt=(max_d-min_d)/ss;%the stepsize of r            
得到r的步长
    for k=1:ss
        r=min_d+k*delt;
        C(k)=correlation_integral(Y,M,r);%calculate the correlation integral
        ln_C(m,k)=log(C(k));%lnC(r)
        ln_r(m,k)=log(r);%lnr
        fprintf('%d/%d/%d/%d\n',k,ss,m,max_m);
    end
    plot(ln_r(m,:),ln_C(m,:));
    hold on;
end
fid=fopen('lnr.txt','w');
fprintf(fid,'%6.2f %6.2f\n',ln_r);
fclose(fid);
fid=fopen('lnC.txt','w');
fprintf(fid,'%6.2f %6.2f\n',ln_C);
fclose(fid)




出错:??? One or more output arguments not assigned during call to 'D:\matlab\work\reconstitution.m (reconstitution)'.
Error in ==> G_P at 12
    Y=reconstitution(data,N,m,tau);%reconstitute state space
怎么解决阿
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-21 05:35 , Processed in 0.063315 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表