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

Click For Summary

Discussion Overview

The discussion revolves around fitting parameters of a specific function, described by the Havriliak-Negami equation, to a data set that resembles a half ellipse. Participants explore methods for parameter estimation and curve fitting, particularly using least-squares fitting techniques and potentially leveraging Matlab functions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant presents a function f=C1 + C2/((C3-X)^C4) and seeks to determine the parameters C1 to C4 that best fit this function to a curve derived from their data set.
  • Another participant questions which specific curve the least-squares fit is being applied to, indicating a need for clarification on the fitting process.
  • A later reply clarifies that the data set appears as a half ellipse and emphasizes the need to compute the parameters of the specified function to describe this curve.
  • Participants suggest that Matlab may offer functions that can optimize the parameters for a least-squares fit, although specific functions or methods are not detailed.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach for fitting the function to the data set, and there are multiple perspectives on how to proceed with the analysis.

Contextual Notes

There is uncertainty regarding the specific curve to which the least-squares fit is applied, and the discussion does not resolve the best method for parameter estimation or the appropriateness of the suggested approaches.

rsr_life
Messages
48
Reaction score
0
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.
 
Engineering news on Phys.org
Last edited by a moderator:
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!
 
Those links I gave you should help with what you want.
 

Similar threads

Replies
6
Views
1K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K