Register to reply

How do I best fit a function's parameters to a curve

by rsr_life
Tags: curve, function, parameters
Share this thread:
rsr_life
#1
Mar23-13, 11:11 PM
P: 52
Hello,

Suppose,
1. I have a function f=C1 + C2/((C3-X)^C4); where Cn is a constant;
I'm looking at the Havriliak-Negami equation which has some 5 constants.

2. I have a data set whose least-squares fit looks like a curve,

How can I compute the values of the function's parameters C1 to C4 that would best fit this function 1 to the curve?

One idea I had was to do a separate curve fitting for the data set (using a polynomial or a set of gaussians), then take the fourier series of that resulting fitting function; compare those terms to the fourier series of this function f, and solve any resulting equations containing C1 to C4.

But I bet there's some Matlab function that does this job better if I simply supply the data set and the function? i.e. it optimizes the functions parameters to get me the best least squares fit to the data set?

Any help with Matlab or pointers to this is appreciated!

Many thanks.
Phys.Org News Partner Engineering news on Phys.org
Comfortable climate indoors with porous glass
Crash-testing rivets
Customized surface inspection
Simon Bridge
#2
Mar24-13, 12:44 AM
Homework
Sci Advisor
HW Helper
Thanks
Simon Bridge's Avatar
P: 12,482
I have a data set whose least-squares fit looks like a curve.
"least squares fit" to which curve?

http://www.mathworks.com/help/optim/ug/lsqnonlin.html
http://www.mathworks.com/moler/leastsquares.pdf
rsr_life
#3
Mar24-13, 11:22 AM
P: 52
Ok. A fit of the function I described to any curve that would best cover the data set I have.

The data set, when plotted, looks like a half ellipse (and is independent of the function).

I need to find the values of the the function's parameters C1 to C4 that would best fit this curve. There are other functions too that could describe this dataset, but I need to compute how I could specifically use this function to describe them.

Thank you!

Simon Bridge
#4
Mar24-13, 07:48 PM
Homework
Sci Advisor
HW Helper
Thanks
Simon Bridge's Avatar
P: 12,482
How do I best fit a function's parameters to a curve

Those links I gave you should help with what you want.


Register to reply

Related Discussions
Sinusoidal function, find its parameters ... Introductory Physics Homework 1
Exponential function with 3 parameters? Precalculus Mathematics Homework 4
Determining parameters of a function from its outputs General Math 18
Voltage Transfer Function determination from S-Parameters Electrical Engineering 2
Function to satisfy this integral for all parameters?! Calculus 4