Which input arguments are missing on my code?

1 次查看(过去 30 天)
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 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by