Which input arguments are missing on my code?

조회 수: 1 (최근 30일)
Dursman Mchabe
Dursman Mchabe 2018년 10월 2일
편집: Stephen23 2018년 10월 2일
Hi everyone, apologies for flooding the forum with question. I am faced with expulsion from the University if I don't solve this code before the 15th of October. I have a set of 7 ordinary differential equations and 1 algebraic which I use to calculate the concentrations of 8 species with time. I have also conducted experiments to measure the concentrations of such 8 species. The challenge I have now that the concentrations predicted by the equations are not the same as the concentrations measured during experiments. As a result, I am looking at ways the regress the 4 parameters and 8 initial conditions, such that the calculated concentrations can match the experimental concentrations.
Which input arguments are missing on my code?
  댓글 수: 3
Dursman Mchabe
Dursman Mchabe 2018년 10월 2일
Hi Stephen Cobeldick, thanks a lot for your response and editing my question. When I run the code I get the error message:
Not enough input arguments.
Error in
EstimationOfParametersAndInitialConditionsUsingLSQCURVEFIT4>@(t,B,BP)f(t,B,BP,V_Headspace,F_rate,CSO2_in,CCO2_in,CCa2,R,T,HSO2,kga,DCa2,DSO2,DHSO3,DSO32,kLa_SO2,kLa_CO2,HCO2,DCO2,DHSO3,DSO32,KSPCaSO3,BETCaSO3,ktot,BETCaCO3,MWCaCO3,Kad,KCO2,KHCO3,KSO2,KHSO3,Kw)
(line 133)
F = @(t, B, BP) f(t, B, BP, V_Headspace, F_rate, CSO2_in, CCO2_in, CCa2, R, T, HSO2, kga, DCa2, DSO2, DHSO3, DSO32, kLa_SO2, kLa_CO2, HCO2,
DCO2, DHSO3, DSO32, KSPCaSO3, BETCaSO3, ktot, BETCaCO3, MWCaCO3, Kad, KCO2, KHCO3, KSO2, KHSO3, Kw);
Error in lsqcurvefit (line 213)
initVals.F = feval(funfcn_x_xdata{3},xCurrent,XDATA,varargin{:});
Error in EstimationOfParametersAndInitialConditionsUsingLSQCURVEFIT4 (line 156)
x = lsqcurvefit(F, x0, ExperimentalTime, ExperimentalConcentrations);
Caused by:
Failure in initial objective function evaluation. LSQCURVEFIT cannot continue.
This is how I know that, there might be missing input arguments. I used to post questions and attache codes in past, however, some members were always insisting that I post the code as well. As it stands I am confused. All I'm asking for, is help.
Stephen23
Stephen23 2018년 10월 2일
편집: Stephen23 2018년 10월 2일
"some members were always insisting that I post the code as well"
I don't know any regular user who wants more clutter in the threads. You can tell them politely that the code is attached, and that is enough.
Please show us the output of this command:
nargin(f)

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by