Fitting points to "skewed" sinusoids Hello, I have a problem related to least square fit of data. Let me start from a step back. I have a set of points, given as x-y coordinates. x represents an angle and y the corresponding value of a function. I am fitting sinusoids to those data points, and I am basically doing it like here: http://www.cheric.org/ippage/e/ipdata/2001/13/node6.html [Broken] (see Curve Fitting with Sinusoidal Functions) This works very well. I can reconstruct A0, A1 and B1 without problems. What I get is a sinusoid that represents the least square fit to my data points. Now comes my problem. The sinusoids that I have to fit are "skewed". Given a certain set of data, I have to fit a function of the kind: [tex] y = A \cos (\omega + \arcsin (d \sin (\phi - \omega)) - \alpha) [/tex] where A is the normal amplitude of the cosine, omega is the pulsation, alpha the phase, d and phi are what cause the "skewness". You can try to plot it to see that this function is like a cosine, but not symmetric. Now, how would I go about fitting that function to my set of data? The problem is very non-linear and I'm stuck. Any suggestion is very appreciated. Thanks!