ode15s ERROR!!! please help me
显示 更早的评论
Hi i'm trying to solve this ode
function [dxdt] = f_ASM(t,x,parameters)
x = [iniXAOB iniXNOB iniXH iniXSTO iniNO2 iniNO3 iniNH4 iniSA ]; %initial conditions parameters=[iNBM iNXI iNSS fXi bAOBNO2 bAOBO2 bHNOx bHO2 bHSTOO2 bNOBNO3 bNOBO2 cPH KAOBFA KAOBFNA KAOBNH4 KAOBNO2 KAOBNO3 KAOBO2 KAOBPH KHA KHNH4 KHNO2 KHNO3 KHO2 KHPH kHSTO KHSTO KNOBFA KNOBFNA KNOBNO2 KNOBNO3 KNOBO2 KNOBPH mumaxAOB mumaxH mumaxNOB niSTONOx niHNOx YAOB YHNOx YHO2 YHSTONOx YHSTOO2 YNOB ]; tEnd = max(time); vTime = linspace(0,tEnd); optionsODE = []; [tOut,xSolution] = ode15s(@f_ASM,vTime,x,optionsODE,parameters);
but when I run, I have these errors Error in odearguments (line 87) f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode15s (line 148) [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ModelingSBR (line 100) [tOut,xSolution] = ode15s(@f_ASM,vTime,x,optionsODE,parameters);
Do you have any idea??
Thanks!!
回答(1 个)
Torsten
2016-3-15
[tOut,xSolution] = ode15s(@(t,x)f_ASM(t,x,parameters),vTime,x,optionsODE);
Best wishes
Torsten.
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!