MATLAB: Theoretical curve fitting in experimental data

MATLABnonlinear

Dear sir I have some Experimental data Say x= 1 2 5 6 etc and corresponding to each of x, the values of y are 8 9 2 1. Now i want to fit an equation y= A +B*[Log(x)/x^n] + sin(x)+ erf(x) etc So how fit this equation in experimental graph,to find out the fitting Parameters A, B and n, for best fitting , please explain in detailed, because i am a learner.
Thanks

Best Answer

Probably the best tool in MATLAB to do this is the function nlinfit() in the Statistics Toolbox.