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!!

Antworten (1)

Torsten
Torsten am 15 Mär. 2016

1 Stimme

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

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 15 Mär. 2016

Beantwortet:

am 15 Mär. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by