File Exchange

## easyfit(x,y,varargi​n)

version 1.4.0.0 (18.5 KB) by
pbest=easyfit(x,y)

Updated 30 May 2018

pbest=EASYFIT(x,y,varargin)
EASYFIT fits the experimental data (x,y) to a model function y = fun(p,x).
If a model function is not given as an input argument, a polynomial model is used.
Bounds (constraints) may be applied on the parameters pbest values returned by easyfit.
An optional plot can be generated which presents the data as well the
"best" curve and confidence intervals for data. the pbest and their uncertainties
are displayed in the command window. For programmatic purposes, this graphical mode can be switched off.

### Cite As

Jean-Luc Dellis (2021). easyfit(x,y,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/10625-easyfit-x-y-varargin), MATLAB Central File Exchange. Retrieved .

Jean-Luc Dellis

Hello all, that function can only handle REAL vectors X and Y. EASYFIT is like NLFIT from the stats tool box, but easier to use for not-expert-in-matlab. Have a look on the given examples. Regards.

Phil Wissgott

good work, but comments are suboptimal. LB and UB have to be the same size as pinit not x0(notation mismatch).
Phil

Tie Ling

I am a new user of Matlab. I will apply the mathematical model by using Matlab to match my experiment. This is very useful for me! Thank you very much!
Another question is: do you have some other example to show how to modify mathematical parameters to better match experiment data? I really need it!
Thanks again!

Tie Ling

I am a new user of Matlab. I will apply the mathematical model by using Matlab to match my experiment. This is very useful for me! Thank you very much!
Another question is: do you have some other example to show how to modify mathematical parameters to better match experiment data? I really need it!
Thanks again!

gok gok

i'm a new to this process.

Jean-Luc Dellis

Whithout response of Duane Hanselman to my email, I place it here:
>>help easyfit does not provide anything helpful.

This has been corrected.

>>Does not add value. Please consider removing this file or make signficant changes to it so it is useful and helpful.

Yes, there is no original or complex algorithm (the code itself takes exactly 7 lines!), just a useful application of nested functions as described by the Matlab Help itself. From this point of view Duane is right.
But, with its simplicity and the given examples, easyfit can be a great help for users who whish to fit experimental data and are not experts (as Duane) in Matlab.

Duane Hanselman

>> help easyfit does not provide anything helpful. No description of input arguments. No error checking. Does not add value. Please consider removing this file or make signficant changes to it so it is useful and helpful.

##### MATLAB Release Compatibility
Created with R14
Compatible with any release
##### Platform Compatibility
Windows macOS Linux