Can I use one of the error models in Simbiology (constant/proportional/combined) while estimating parameters in MATLAB? I am using lsqnonlin for curvefitting and estimating the parameters. How can I incorporate a constant error function with it?
SimBiology's error models are only available when fitting data to SimBiology models using functions like sbiofit. If you are directly calling lsqnonlin, then you are probably doing "traditional" nonlinear least-squares regression, which is equivalent to a constant error model. It is possible to adapt lsqnonlin for other error models, but it requires a fair amount of work. If you can't use sbiofit, then I would recommend using fitnlm (or perhaps nlinfit), if you have a license for Statistics and Machine Learning Toolbox. Both of these functions support proportional and combined error models.