Index exceeds matrix dimensions (Monod kinetics and curve fitting)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
José-Luis
il 31 Ago 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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!