# How to get the cosine of a waveform?

I have a set of samples that represents a waveform. This waveform resembles a frequency modulated sinusoidal wave (only it is not).

I would like to invert this waveform or shift it by $2\pi$ shift it by $\pi$. of course taking the cosine of samples as they are without preprocessing is wrong.

What should I do to achieve this?

Thank you.

-
Shifting by 2π is the same as doing nothing. I guess it's not what you want. Can you clarify the question ? – Frédéric Grosshans Nov 23 '10 at 13:08
you are right, it wouldn't do a thing! what I would like to get is a mirror reflection of the waveform over the x-axis but with the same dc-component as the original waveform (I don't want to shift it on the Y-axis). – mbadawi23 Nov 23 '10 at 13:26
Do you mean you have a Fourier spectrum of the waveform? – ptomato Nov 23 '10 at 13:31