MATLAB Answers

Naty S
0

Fitting Functions

Asked by Naty S
on 23 Jan 2012

I have a Vector of Data. and i want to do a fitting to the Vector. but I want the fit to be in the shape of:

A/x+B/x^2+C/x^3...

is there any Known function I am missing?or do i need to write my own code. if so anyone is familiar with a good way to do that?

  0 Comments

Sign in to comment.

3 Answers

Answer by the cyclist
on 23 Jan 2012
 Accepted Answer

If you have the Statistics Toolbox, you can use the function nlinfit() to do that.

  0 Comments

Sign in to comment.


Answer by Naty S
on 27 Jan 2012

Thanks

  0 Comments

Sign in to comment.


Answer by Frederic Moisy on 30 Jan 2012

Hi,

First solution: replace x by y=1/x, then use polyfit to fit your data with respect to y.

Second solution: install the Ezyfit toolbox, http://www.mathworks.com/matlabcentral/fileexchange/10176-ezyfit-2-40

and type

showfit ('A/x+B/x^2+C/x^3')

  0 Comments

Sign in to comment.