# Complex Sinusoidal Waves

[b][red]This message was edited by widebluecorn at 2004-3-28 10:35:58[/red][/b][hr]
This is quite a stupid question, but here it is anyway.

I have a sinusoidal output of a system, that is read (sampled) into the computer using a DSP chip. I was wondering how to seperate the wave into its real and imaginary parts. Is this even possible?

(I am using C code for this application)

Appreciate any help.

WBC.

• : This is quite a stupid question, but here it is anyway.
:
: I have a sinusoidal output of a system, that is read (sampled) into the computer using a DSP chip. I was wondering how to seperate the wave into its real and imaginary parts. Is this even possible?
:
: (I am using C code for this application)
:
: Appreciate any help.
:
To my understanding, the real part is the amplitude (which is essentially what your set of values represent). The imaginary part is related to the frequency and phase. E.G.

Ae^i(wt + p) = Acos(wt + p) + iAsin(wt + p)

If you can work out the period of the waveform (looking for sign changes, maybe some interpolation) you can find w by:-

w = T / (2 * Pi)

The distance from the start of the set of samples to the first time the waveform passes through 0, then looking at the sign after that will tell you something about p.

If you know w, t and p then I'd guess that sin(wt + p) will give you your imaginary component.

Don't quote me on any of that, I hope this gives you some kind of idea (and that I've been reasonably accurate).

Jonathan

###
for(74,117,115,116){\$::a.=chr};((\$_.='qwertyui')&&
(tr/yuiqwert/her anot/))for(\$::b);for(\$::c){\$_.=\$^X;
/(p.{2}l)/;\$_=\$1}\$::b=~/(..)\$/;print("\$::a\$::b \$::c hack\$1.");

• Cool thanks, i think i get it now.

Appreciate the help.

WBC