24小时热门版块排行榜    

查看: 1049  |  回复: 0

wyjjf

新虫 (正式写手)

[交流] MATLAB出现有错吗?

MATLAB有错吗?
(1)dx=[dx(1);dx(2);dx(3);dx(4);dx(5);dx(6)];       %这一句和书上一样啊?
(2)[t,x]=ode45('ODE45_fun',tspan,x0);    %和书上也是一样啊
(3)另外不懂:
The element type "name" must be terminated by the matching end-tag "</name>".
Could not parse the file: d:\matlab7\toolbox\ccslink\ccslink\info.xml
(4)实在不懂【求解释,谢谢】:
Error in ==> funfun\private\odearguments at 110
f0 = feval(ode,t0,y0,args{:});   % ODE15I sets args{1} to yp0.
点击 funfun\private\odearguments at 110 后出现110-118:
f0 = feval(ode,t0,y0,args{:});   % ODE15I sets args{1} to yp0.
[m,n] = size(f0);
if n > 1
  error('MATLABdearguments:FoMustReturnCol',...
        [funstring(ode) ' must return a column vector.'])
elseif m ~= neq
  msg = sprintf('an initial condition vector of length %d.',m);
  error('MATLABdearguments:SizeIC', ['Solving ' funstring(ode) ' requires ' msg]);
end
(5)实在不懂【求解释,谢谢】:
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...
点击 funfun\private\odearguments at 110 后出现173-178:
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...
options, threshold, rtol, normcontrol, normy, hmax, htry, htspan, ...
dataType] = ...
    odearguments(FcnHandlesUsed, solver_name, odeFcn, tspan, y0, ...
                 options, varargin);
nfevals = nfevals + 1;


以下是该程序
ODE45_fun:

function dx=ODE45_fun(t,x)
a1=1;a2=1;e1=9;e2=7;f1=56;f2=98;g1=76;g2=665;
a=a1+a2;
e=e1+e2;
f=f1+f2;
g=g1+g2;
dx(1)=x(3)-x(2)+x(4)*x(2)-2*x(5)*x(2)-x(2)*x(2)-x(5)-e-f-g;
dx(2)=x(1)-x(3)+x(4)*x(2)-x(2)*x(2)-x(5)*x(5)-x(5)*x(2)-e*f-g;
dx(3)=x(2)-x(1)+x(5)*x(1)-x(4)*x(3)+x(3)+x(4)+e*g+f;
x(6)=x(4)*x(5)+x(2)*x(3)+e*f+e*g;
dx(4)=x(5)*a+x(3)*x(1)+x(3)+e*f*g*x(6)
dx(5)=x(4)*a+x(2)*x(1)-e*f*x(1)-x(2)*x(2)*x(5)-x(2)*x(5)*x(5)-e*f-f*g

dx=[dx(1);dx(2);dx(3);dx(4);dx(5);dx(6)];

ODE45_main:
tspan=[0,10];
x0=[0;0.1;2;0;0.1;2];
[t,x]=ode45('ODE45_fun',tspan,x0);
data=[t,x];
save ODE45_data.txt data -ascii
subplot(2,3,1),plot(t,x(1))
subplot(2,3,2),plot(t,x(2))
subplot(2,3,3),plot(t,x(3))
subplot(2,3,4),plot(t,x(4))
subplot(2,3,5),plot(t,x(5))
subplot(2,3,6),plot(t,x(6))

MATLAB出现有错吗?
出错信息.jpg


MATLAB出现有错吗?-1
六元方程组怎么用MATLAB编辑程序?.jpg
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 wyjjf 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 中青基了要发朋友圈吗? +7 349506619 2026-08-28 7/350 2026-08-31 13:39 by 冼亮淀粉酶
[基金申请] 投票:  有多少人是今天查系统知道结果的? +17 爱看书的可乐 2026-08-26 19/950 2026-08-31 11:51 by xiangy672
[基金申请] 能否申诉? +6 echo8914667 2026-08-30 7/350 2026-08-31 08:41 by kingkocxr
[基金申请] 面上意见出来了 +10 黄鸟于飞Chao 2026-08-29 19/950 2026-08-31 08:01 by blueearth171
[基金申请] 为什么到现在没收到通知? +5 tannykie 2026-08-29 5/250 2026-08-30 21:05 by purplejack
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[考博] 找导师 +6 yuanjiabao 2026-08-29 7/350 2026-08-30 14:40 by 生科新手
[基金申请] 麻烦专家们看看评委们的意见(F口面上) +6 gdd2018 2026-08-28 11/550 2026-08-30 08:58 by 超级无敌华子
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[基金申请] 2026年叶企孙基金 +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[基金申请] 怎么查啊 +6 huang1991js 2026-08-26 6/300 2026-08-28 08:42 by winsaint
[基金申请] 面上合作单位盖章 +5 ssyjh 2026-08-27 5/250 2026-08-27 20:50 by gdfollow
[基金申请] 为什么 国际(地区)合作与交流项目 没有放榜? 10+3 majunge000 2026-08-26 11/550 2026-08-27 08:42 by 北京莱茵编辑
[基金申请] 我不理解! +15 Edward_pc 2026-08-26 23/1150 2026-08-26 20:34 by zzuzxg
[基金申请] 为什么国自然不能直接公布 +4 bjdxyxy 2026-08-26 4/200 2026-08-26 13:12 by qingmu1201
[基金申请] 系统进不去 +4 yanglien 2026-08-26 5/250 2026-08-26 11:10 by wenfengw83
[基金申请] 国合可查了 +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[基金申请] 今天务委会开完了,明天出结果吗 +19 angus9576 2026-08-25 23/1150 2026-08-26 10:03 by zp519
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
[基金申请] 没有任何消息-是不是就凉了 +9 图啦图啦 2026-08-24 10/500 2026-08-25 11:59 by 南海小哥
信息提示
请填处理意见