Index exceeds matrix dimensions (Monod kinetics and curve fitting)

조회 수: 1 (최근 30일)
Dursman Mchabe
Dursman Mchabe 2017년 8월 31일
댓글: Dursman Mchabe 2017년 8월 31일
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
José-Luis
José-Luis 2017년 8월 31일
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 2017년 8월 31일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by