Index exceeds matrix dimensions (Monod kinetics and curve fitting)

1 visualización (últimos 30 días)
Dursman Mchabe
Dursman Mchabe el 31 de Ag. de 2017
Comentada: Dursman Mchabe el 31 de Ag. de 2017
Hi, I'm trying to fit dS/dt = -v1*ktot1*SSA1*S*(1-Kad1*S/(1+Kad*S)) on to experimental data (deg25deg.mat). Yet I get this error message:
" Index exceeds matrix dimensions.
Error in dissolutionKinetics/NSdeg25deg (line 10) xdot(1)= -1.*B(1).*B(2).*B(4).*x(1).*(1-((B(3).*x(1))/(1+(B(3).*x(1)))));
Error in odearguments (line 90) f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 115) odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in dissolutionKinetics (line 7) [t1,y1]=ode45(@NSdeg25deg,[0 30],0.01);
Error in lsqcurvefit (line 202) initVals.F = feval(funfcn_x_xdata{3},xCurrent,XDATA,varargin{:});
Error in calling (line 2) [B,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat] = lsqcurvefit(@dissolutionKinetics,B0,Time,deg25deg);
Caused by: Failure in initial objective function evaluation. LSQCURVEFIT cannot continue". I don't know what to change on line 10. Please help. Please find the *.m files on the attachment.
>>
  4 comentarios
José-Luis
José-Luis el 31 de Ag. de 2017
It does more than pointing out where the error is.
Place a breakpoint where the error occurs and look at the size of the offending variables where the error occurs.
Dursman Mchabe
Dursman Mchabe el 31 de Ag. de 2017
I am currently trying different things, as I read from previous answers to previous similar question. The current error is "Not enough input arguments". I will keep on trying until I win.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by