[pbest, SD] = easyfit(x, y, pinit, fhandle)

EASYFIT finds the parameters P of a function y = fun(p,x) which models experimental data (x,y) as well as possible.

https://sites.google.com/site/jeanlucdellis/

You are now following this Submission

[pbest, SD] = easyfit(x, y, pinit, fhandle)
X vector of the independent variable
Y vector of the "measured" (dependent) variable
FHANDLE handle to a function FUN which is aimed to model the experimental data : Y = FUN(p, X)
PINIT initial guess on the parameter values
PBEST - best parameters in a least squares meaning
SD - Standard Deviations in the parameters p
Examples are given in the help lines
To compute the SD, the "Wild Bootstrap" method is used. It is described there : https://en.wikipedia.org/wiki/Bootstrapping_(statistics)

Cite As

Jean-Luc Dellis (2026). [pbest, SD] = easyfit(x, y, pinit, fhandle) (https://www.mathworks.com/matlabcentral/fileexchange/10625-pbest-sd-easyfit-x-y-pinit-fhandle), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
2.0

i) The code has been simplified. For instance, graphics are any more generated.
ii) Standard Deviations in the function parameters are output.

1.4.0.0

- the help lines and examples have been improved
- the main results are displayed in the command window

1.3.0.0

Fix minor points and add an example where one parameter is hold constant in fitting.

1.0.0.0

- put VARARGIN to simplify the use
- put UNCERTAINTIES as a subfunction to compute them as
well the data confidence intervals