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
Torsten 2016년 3월 15일

1 개 추천

[tOut,xSolution] = ode15s(@(t,x)f_ASM(t,x,parameters),vTime,x,optionsODE);
Best wishes
Torsten.

카테고리

도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2016년 3월 15일

답변:

2016년 3월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by