Reply by Salvadorr October 6, 20062006-10-06
I use atan2, it was OK, Thanks for your time. Really thanks!!!!!!!!!!!!!

Reply by Rune Allnor October 6, 20062006-10-06
Salvadorr skrev:

> I write a program for FHT(Hartley) and i wtite a flat top, hanning and > hamming window function everything is ok here. Im analysing 2 signal of 60 > Hz both. > > v=3Dsin(2pif) > i=3Dsin(2pif-theta_i) > theta=3Dtheta_v-theta_i > > if theta_i is between 0-27 degrees and theta_v=3D0 there=B4s no problem t=
heta=3D
> angle between 0-27 but if theta_i is for example 28 or more (theta_v =3D=
0)
> theta=3D-152, i dont know what happend, Can anyone help me?
What you write here mixes radians and degrees. You do, of course, convert from degrees to radians in you computations? Rune
Reply by Ron N. October 5, 20062006-10-05
On Oct 5, 5:50 pm, "Salvadorr" <salpi...@hotmail.com> wrote:
> Hello for everybody!!!!!!!!!!!!! > > I write a program for FHT(Hartley) and i wtite a flat top, hanning and > hamming window function everything is ok here. Im analysing 2 signal of 60 > Hz both. > > v=3Dsin(2pif) > i=3Dsin(2pif-theta_i) > theta=3Dtheta_v-theta_i > > if theta_i is between 0-27 degrees and theta_v=3D0 there=B4s no problem t=
heta=3D
> angle between 0-27 but if theta_i is for example 28 or more (theta_v =3D=
0)
> theta=3D-152, i dont know what happend, Can anyone help me?
Note that 28 + 152 =3D 180 degrees of phase. This is the type of difference that using an atan() instead of an atan2() function can produce.
Reply by Salvadorr October 5, 20062006-10-05
Hello for everybody!!!!!!!!!!!!!

I write a program for FHT(Hartley) and i wtite a flat top, hanning and
hamming window function everything is ok here. Im analysing 2 signal of 60
Hz both.

v=sin(2pif)
i=sin(2pif-theta_i)
theta=theta_v-theta_i

if theta_i is between 0-27 degrees and theta_v=0 there&#4294967295;s no problem theta=
angle between 0-27 but if theta_i is for example 28 or more  (theta_v = 0)
theta=-152, i dont know what happend, Can anyone help me?
Im gonna appreciate. Tahnks!!!!!!!!!