![]() |
计算常微分方程 出错原因
我建立了一个函数文件 保存在work中
function f=fun3(x,y) f=[-2*y+2*x.^2+2*x] end 然后进行了如下调用 [x,y]=ode23('fun3',[0,0.5],1) ??? Error using ==> feval Undefined function or method 'fun3' for input arguments of type 'double'. Error in ==> odearguments at 110 f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0. Error in ==> ode23 at 172 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ... 计算常微分方程,但是却一直出错。 请高手帮忙,谢谢! |
回复: 计算常微分方程 出错原因
可以运行啊
f = -2 f = -1.8792 f = -1.8254 f = -1.7662 f = -1.6227 f = -1.5607 f = -1.4905 f = -1.3557 f = -1.2975 f = -1.2315 f = -1.1047 f = -1.0499 f = -0.9877 f = -0.8681 f = -0.8163 f = -0.7575 f = -0.6444 f = -0.5954 f = -0.5398 f = -0.4325 f = -0.3860 f = -0.3332 f = -0.2313 f = -0.1870 f = -0.1368 f = -0.0397 f = 0.0025 f = 0.0505 f = 0.1432 f = 0.1836 f = 0.2294 f = 0.2470 f = 0.2555 f = 0.2643 x = 0 0.0400 0.0900 0.1400 0.1900 0.2400 0.2900 0.3400 0.3900 0.4400 0.4900 0.5000 y = 1.0000 0.9247 0.8434 0.7754 0.7199 0.6764 0.6440 0.6222 0.6105 0.6084 0.6154 0.6179 |
所有时间均为北京时间。现在的时间是 11:04。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.