sinfit(vx, vy, vg) Returns a vector
containing the coefficients for a sine curve of the form a·sin(x+b)+c
that best approximates the data in vx and vy
using guess values in vg. The sinfit function
employs the Levenberg-Marquardt method for minimization.
Arguments:
- vx and vy
are vectors of real data values of the same length, corresponding to the
x and y-values in the
data set. There must be at least 3 data points.
- vg is a three-element
vector of real guess values for the parameters a,
b, and c in the sinusoidal
fit equation.
Notes:
- To further analyze your data, or determine the suitability
of a linear regression, you may wish to apply other statistics
functions for data analysis.
- If you wish to do an exponential fit that differs
from the form above, use genfit.