"Too many Input Arguments" for my ode15s

3 Ansichten (letzte 30 Tage)
Pazzo Giampalo
Pazzo Giampalo am 29 Nov. 2013
Kommentiert: Pazzo Giampalo am 29 Nov. 2013
Hello,
I have a question about solving "Too many input arguments" when using ode15s. But I checked that the number of arguments is correct. Also, I don't have any other file with the same file name but different arguments. I wonder if someone could please help me out here. Thanks in advance
  • % ODE Solver
  • % Syntax: [T,Y] = ode15s('yprime',[t0,tF],y0);
  • t0 = 0.00;
  • tF =180;
  • OBp0 = 1.2005084e9;
  • OBa0 = 1.0001628e9;
  • OCa0 = 1.674764e8;
  • BoneT0 = 100;
  • PCe0 = 0;
  • PCl0 = 0.0;
  • WNT0 = 0;
  • DKK10 = 0;
  • PSA0 = 0;
  • LTGFB0 = mu .* Kres .* OCa0 ./ (lambdaLTGFB + BLTGFB1); % calculate based on model w/o PCa
  • TGFB0 = BLTGFB1 .* LTGFB0 ./ (lambdaTGFB); % ditto
  • E0 = 1.86e9;
  • X1P0 = 0;
  • X2P0 = 0;
  • X2B0 = 0;
  • Q10 = 0.40;
  • Q20 = 0.10;
  • Q30 = 0.40;
  • A0 = 5.406;%??
  • P0 = 0;
  • Ps0 = 0;
  • options=odeset('RelTol',1e-10, 'AbsTol', 1e-14);
  • [T,V]= ode15s(@myfunc, [t0,tF], [OBp0,OBa0,OCa0, BoneT0, PCe0, PCl0, WNT0 ,DKK10 ,PSA0, LTGFB0 ,TGFB0, E0, X1P0, X2P0,X2B0,... Q10, Q20, Q30, A0, P0, Ps0],options,mu,DOBu,OBu,BLTGFB1,...
  • and the rest are just more parameters.
  • Error using BONEwithTUMORandADAIPSA>myfunc
  • Too many input arguments.
  • Error in odearguments (line 88)
  • f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
  • Error in ode15s (line 149)
  • [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
  • Error in BONEwithTUMORandADAIPSA (line 163)
  • [T,V]= ode15s(@myfunc, [t0,tF], [OBp0,OBa0,OCa0 , BoneT0, PCe0, PCl0, WNT0,DKK10 ,PSA0, LTGFB0 ,TGFB0, E0, X1P0, X2P0,X2B0,...
  • Thanks!
  • Pazzo

Antworten (1)

Image Analyst
Image Analyst am 29 Nov. 2013
Bearbeitet: Image Analyst am 29 Nov. 2013
It looks like it can take 3 or 4 input arguments:
[TOUT,YOUT] = ode15s(ODEFUN,TSPAN,Y0,OPTIONS) solves as above with default
integration properties replaced by values in OPTIONS, an argument created
with the ODESET function. See ODESET for details.
You use odeset() to create options, but you don't pass in options - you pass in a whole bunch of other arguments: mu,DOBu,OBu,BLTGFB1, etc.. Why? Why didn't you pass in options?
  3 Kommentare
Image Analyst
Image Analyst am 29 Nov. 2013
I haven't used the function ever - all I did was notice that you had way more than 4 inputs so that's why it's complaining. Sorry I can't help more but I've never used that function.
Pazzo Giampalo
Pazzo Giampalo am 29 Nov. 2013
it's interesting because once i had less inputs (but still >4, i had 11 back then), no problem at all running the code, all I did was just added some more inputs based on my need, but i got this error stating that i have too many input arguments. And I am not familiar with options created by odeset. So I looked up this page, http://www.mathworks.com/help/matlab/ref/odeset.html but still I am confused how to fix the problem. Thank you anyway! I hope someone else could help me out here.

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by