編輯一MATLAB程序,總是出錯,按提示信息改動了很多遍
還是不行
不明白了
麻煩幫幫看看怎么修改
編輯程序:
在Matlab下輸入:edit,然后將下面兩行百分號之間的內(nèi)容,復(fù)制進去,保存? 然后,在Matlab下面輸入: 結(jié)果出錯信息
第一:
dx(1)=x(3)-x(2)+x(4)*x(2)-2*x(5)*x(2)-x(2)*x(2)-x(5)-e-f-g;
有錯嗎?
二:
Error in ==> funfun\private\odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
即:
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
[m,n] = size(f0);
if n > 1
error('MATLAB dearguments:FoMustReturnCol',...
[funstring(ode) ' must return a column vector.'])
elseif m ~= neq
msg = sprintf('an initial condition vector of length %d.',m);
error('MATLAB dearguments:SizeIC', ['Solving ' funstring(ode) ' requires ' msg]);
End
三:
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...
即:
[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;
![MATLAB程序總是出錯?]()
出錯信息1.jpg
![MATLAB程序總是出錯?-1]()
2.jpg
![MATLAB程序總是出錯?-2]()
3.jpg
[ Last edited by xiegangmai on 2015-3-13 at 16:40 ] |