Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a system which is sampling at 100Hz. my input is sinusodial. The output is similar to cosine waveforms with varying frequency. I have no clue how to find out the exact formula to put into the cosine function to generate the exact output as the system

input is sinusoidal graph with 1 as amplitude, and output is cosine plot with the following local max


from here How to find out the control function of a cosine wave?

i calculated my b to be 1*10e-6, but i can't multiply it out with thw input sinusodial plot.. matlab wont let me.

share|cite|improve this question

There seems to be a typo in your data; $550$ should be $5500$. The $1$ is probably spurious since it doesn't fit with the rest of the pattern. The remaining maxima are evenly spaced (here's a plot), so your output is just sinusoidal; there's no reason to apply the answers of that other question that dealt with maxima spaced in a particular way, not evenly.

To describe your output, note that the maxima occur roughly every $628{\frac13}$ samples. The one at $476$ is slightly displaced, but the remaining ones have distances $629,628,628,629,\dotsc$, so to get the highest precision you can choose one that's symmetrically located between two differences of $628$, say, $2358$; then the corresponding function would be $\cos(2\pi(t-2358)/628{\frac13})$.

share|cite|improve this answer
@oluwatola: I was assuming amplitude $1$. If the minimum is at $-8$, you'll have to multiply the function I gave by $8$. I just noticed I forgot the factor of $2\pi$; I fixed that. Note that $\cos(2\pi(0-2358)/628{\frac13})\approx0$ comes out about right. – joriki May 4 '12 at 7:56
@oluwatola: You'd need to say more about the context, what you're using how as a control function for what. All I've done here is show you how to find the functional form given evenly spaced local maxima of a function presumed to be have sinusoidal form. – joriki May 4 '12 at 8:03
@oluwatola: the method to find these parameters is linear regression (in the previous thread the function was quadratic like $x_2\mapsto y_2$ and not linear). To find yourself the parameters you may try Alpha getting $y=628.339\cdot x+472.952=628.339\cdot (x+0.7527)$. This way you'll get the $628\frac 13$ proposed by joriki. See his fine explications for the remainder. – Raymond Manzoni May 4 '12 at 11:51
@oluwatola: Ignoring my responses and then just deleting your comments without explanation doesn't exactly increase my motivation to interact further. – joriki May 4 '12 at 11:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.