24小时热门版块排行榜    

查看: 254  |  回复: 3
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

我要飞

铁虫 (正式写手)

[求助] 为何出错?

请大家看看这个程序为何出错?如何修改?谢谢了!
function [T, Y]=FOChen(parameters, orders, TSim, Y0)
%
format long e
% Numerical Solution of the Fractional-Order Chen's System
%
%   D^q1 x(t) = a(y(t)-x(t))
%   D^q2 y(t) = dx(t) - x(t)z(t) + cy(t)
%   D^q3 z(t) = x(t)y(t) - bz(t)
%
% function [T, Y] = FOChen(parameters, orders, TSim, Y0)
%
% Input:    parameters - model parameters [a, b, c, d]
%           orders - derivatives orders [q1, q2, q3]
%           TSim - simulation time (0 - TSim) in sec
%           Y0 - initial conditions [Y0(1), Y0(2), Y0(3)]
%
% Output:   T - simulation time (0 : Tstep : TSim)
%           Y - solution of the system (x=Y(1), y=Y(2), z=Y(3))
%
% Author:  (c) Ivo Petras (ivo.petras@tuke.sk), 2010.
%

% time step:
h=0.005;
% number of calculated mesh points:
n=100/h;
%orders of derivatives, respectively:
q1=0.99; q2=0.96; q3=0.92;
% constants of Chen's system:
a=10; b=1;
c=1; d=5;
% binomial coefficients calculation:
cp1=1; cp2=1; cp3=1;
for j=1:n
    c1(j)=(1-(1+q1)/j)*cp1;
    c2(j)=(1-(1+q2)/j)*cp2;
    c3(j)=(1-(1+q3)/j)*cp3;
    cp1=c1(j); cp2=c2(j); cp3=c3(j);
end
% initial conditions setting:
x(1)=0.5; y(1)=0.6; z(1)=0.1;
% calculation of phase portraits /numerical solution/:
for i=2:n
    x(i)=(a*(y(i-1)-x(i-1)))*h^q1 - memo(x, c1, i);
    y(i)=(-d*x(i)-x(i)*z(i-1)+c*y(i-1))*h^q2 - memo(y, c2, i);
    z(i)=(x(i)*y(i)-b*z(i-1))*h^q3 - memo(z, c3, i);
end
for j=1:n
    Y(j,1)=x(j);
    Y(j,2)=y(j);
    Y(j,3)=z(j);
end
T=h:h:TSim;
%

[ Last edited by 我要飞 on 2011-11-18 at 10:00 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

这个需要你看这个程序的出处,找到完整的程序代码。包括这个程序里面所用其他函数,主要是memo

[ Last edited by dbb627 on 2011-11-18 at 10:31 ]
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
4楼2011-11-18 10:30:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 4 个回答

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

引用回帖:
1楼: Originally posted by 我要飞 at 2011-11-18 09:34:21:
请大家看看这个程序为何出错?如何修改?谢谢了!
function [T, Y]=FOChen(parameters, orders, TSim, Y0)
%
format long e
% Numerical Solution of the Fractional-Order Chen's System
%
%   D^q1 ...

我估计运行时,可能会缺少某些函数,例如memo没有定义
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
2楼2011-11-18 10:18:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

我要飞

铁虫 (正式写手)

引用回帖:
2楼: Originally posted by dbb627 at 2011-11-18 10:18:17:
我估计运行时,可能会缺少某些函数,例如memo没有定义

请问这个如何修改就可以了?谢谢了
3楼2011-11-18 10:25:27
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 2019年青年基金涵评意见,大家看看几个A,几个B? +5 Tide man 2026-08-11 5/250 2026-08-12 09:24 by kangban
[论文投稿] 职称评审,求友友推荐见刊最快的期刊 +4 工厂打螺丝 2026-08-08 4/200 2026-08-12 09:18 by hansi2025
[基金申请] 应该是93bebmhtak前后十一个字符比较关键 +18 Lanmanbaby 2026-08-09 30/1500 2026-08-12 09:10 by xandria
[基金申请] 综述论文作为代表作会不会影响评审专家的印象分? +11 yufeiwaner 2026-08-09 13/650 2026-08-12 08:17 by yufeiwaner
[基金申请] 是这周出结果还是下周出结果? +3 yuleib84 2026-08-11 3/150 2026-08-11 21:53 by jnhyjjm
[基金申请] 有时候,自然基金真的不能太认真 (我的申报经验) +3 majunge000 2026-08-11 4/200 2026-08-11 20:13 by lch2012
[基金申请] 什么时候出结果,有咨询渠道??? +3 Tide man 2026-08-11 3/150 2026-08-11 17:54 by kudofaye
[基金申请] 分享一下我之前已中青C的计划书的filecode +3 布布和一二 2026-08-11 4/200 2026-08-11 15:20 by aasahr
[基金申请] 基金中了 +15 laoda193707 2026-08-06 15/750 2026-08-11 00:11 by jiafei2190
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 关于代码变化问题,想知道的进来 +17 且听虎啸 2026-08-07 24/1200 2026-08-10 18:35 by zhangduo2008
[基金申请] 好奇怪的filecode +4 布布和一二 2026-08-08 5/250 2026-08-10 14:20 by 冰心玉壶晴
[基金申请] 2026国自然放榜时间 +9 布布和一二 2026-08-08 9/450 2026-08-10 11:22 by xxxx2020
[基金申请] 这样的filecode谁见过 +11 布布和一二 2026-08-08 22/1100 2026-08-10 11:10 by wmfsnow
[基金申请] filecode与中标关系的预测 +5 布布和一二 2026-08-07 5/250 2026-08-09 16:15 by 袁向阳007
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
[基金申请] 大家散了吧,后缀研究没有意义,别浪费时间了,过好目前的每一天,不要焦虑 +5 Tide man 2026-08-06 7/350 2026-08-07 13:11 by 医学老男孩
[基金申请] filecode +14 等待解的谜 2026-08-06 19/950 2026-08-07 12:20 by wlwhappy
[基金申请] 影响面上的因素 +8 布布和一二 2026-08-05 11/550 2026-08-06 10:41 by 宝贝虫子
[基金申请] 好消息?这个有何含义??? +8 Tide man 2026-08-05 10/500 2026-08-05 16:14 by xmuxiaoyu
信息提示
请填处理意见