Hi Everyone,
I have a user-defined code that is based on Euler method, that runs successfully. However the output does not compare satisfactority with the experiment for one variable. I would like to use fminsearch to estimate the parameters that can improve the fitting. However, when I try that I get the error message that states:
Error using fzero (line 306)FZERO cannot continue because user-supplied function_handle ==> HionpH failed with the error below. Not enough input arguments.Error in ParametersFittingEulerMethodWater>EulerMethod (line 131)pH = fzero(@HionpH, pH1);Error in fminsearch (line 200)fv(:,1) = funfcn(x,varargin{:});Error in ParametersFittingEulerMethodWater (line 58)[b, Results] = fminsearch(@EulerMethod,b);
I can not figure out which arguments are outstanding.
I have attached both the running code and the faulty code.
Please help
Best Answer