声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1431|回复: 8

[稳定性与分岔] 求助高手帮忙

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

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

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

x
function s_t_m=C_CMethod_m(data)
%this function calculate time delay and embedding demension with C-C
%Method,which proved by H.S.Kim
%skyhawk&flyinghawk
%****************调试程序段****************************
%clear all;
%data=load('d:/matlab7/toolbox/work/5.txt');
%************************************************
data=load('5.txt')
N=length(data);
max_d=9;%the maximum value of the time delay
sigma=std(data);%calcute standard deviation s_d
for m=2:5
    for t=1:max_d
        t
        for j=1:4
            r=sigma*j/2;
            data_d=disjoint(data,N,t);%将时间序列分解成t个不相交的时间序列
            [ll,N_d]=size(data_d);
            s_t3=0;
           for i=1:t
                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-t)*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;
        end
        s_t_m(t,m)=max(s_t2)-min(s_t2);
    end
end
fid=fopen('s_t_m.txt','w');
fprintf(fid,'%f %f %f %f\n',s_t_m);
fclose(fid);
t=1:max_d;
plot(t,s_t_m(:,2),t,s_t_m(:,3),'+',t,s_t_m(:,4),'.',t,s_t_m(:,5),'*')


为什么会出现下面的问题?
??? Undefined command/function 'disjoint'.
Error in ==> c_c_ at 21
            data_d=disjoint(data,N,t);%将时间序列分解成t个不相交的时间序列

回复
分享到:

使用道具 举报

发表于 2009-5-15 22:58 | 显示全部楼层

回复 楼主 yanzi 的帖子

"data_d=disjoint(data,N,t);"其中disjoint不是MATLAB的内部函数,是自己定义的一个子函数

评分

1

查看全部评分

 楼主| 发表于 2009-5-16 20:57 | 显示全部楼层

回复 沙发 yuling 的帖子

那怎么改写这个程序才能完整 合理?
发表于 2009-5-16 23:19 | 显示全部楼层

回复 板凳 yanzi 的帖子

你写一个将时间序列分解成t个不相交的时间序列的子函数“disjoint(data,N,t)”就可以了

评分

1

查看全部评分

 楼主| 发表于 2009-5-17 20:15 | 显示全部楼层

回复 地板 yuling 的帖子

你说的是下面的这个程序吗?

function data_d=disjoint(data,N,t)
%the function is used to subdivid the time series into t disjoint time
%series.
%data:the time series
%N:the length of the time series
%t:the index lag
%skyhawk
for i=1:t
    for j=1:(N/t)
        data_d(i,j)=data(i+(j-1)*t);
    end
end
 楼主| 发表于 2009-5-20 17:28 | 显示全部楼层
关键是怎么写一个将时间序列分解成t个不相交的时间序列的子函数“disjoint(data,N,t)”啊
帮忙写一下  真的 谢谢了 本人实在是很愚钝  没做出来
 楼主| 发表于 2009-5-21 16:04 | 显示全部楼层
问题解决了
发表于 2009-5-22 14:07 | 显示全部楼层

回复 7楼 yanzi 的帖子

楼主也不共享一下经验,具体怎样解决的
 楼主| 发表于 2009-5-24 16:38 | 显示全部楼层

回复 8楼 mjhzhjg 的帖子

添加子程序  一切搞定
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-9-21 08:40 , Processed in 0.080381 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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