Azzera filtri
Azzera filtri

Which input arguments are missing on my code?

2 visualizzazioni (ultimi 30 giorni)
Dursman Mchabe
Dursman Mchabe il 2 Ott 2018
Modificato: Stephen23 il 2 Ott 2018
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 Commenti
Dursman Mchabe
Dursman Mchabe il 2 Ott 2018
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 il 2 Ott 2018
Modificato: Stephen23 il 2 Ott 2018
"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)

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Linear Algebra 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!

Translated by