Xref: utzoo rec.games.programmer:2408 comp.os.msdos.programmer:1676
Path: utzoo!attcan!uunet!wuarchive!psuvax1!rutgers!njin!uupsi!rodan.acs.syr.edu!jkchan
From: jkchan@rodan.acs.syr.edu
Newsgroups: rec.games.programmer,comp.os.msdos.programmer
Subject: re: discrete sin function programming (conclusion)
Message-ID: <1990Oct26.131952.11922@rodan.acs.syr.edu>
Date: 26 Oct 90 13:19:52 GMT
Sender: jkchan@rodan.acs.syr.edu
Organization: Syracuse University, Syracuse, NY
Lines: 46
A week ago I asked for help for the discrete sin function programming
probelm I met. Thanks for the responses. All of you are very helpful
and my problem has been solved.
My original problem was frequency change in a sinusodal sine wave.
For those who knows calculus, that is easy to understand:
In general: y = M sin x with w = dx/dt = 2 PI f
Now, for a constant frequency sine wave, f = f0,
dx = 2 PI f0 dt
which integrates to
x = 2 PI f0 t + c (if we set x=c when t=0)
Hence, y = M sin (2 PI f0 t + c)
which is the well-known simple (constant frequency) sinusodal equation.
But, for a linear frequency changing waveform, f = f0 + k t,
where k is a proportionality constant,
we have
dx = 2 PI (f0 + k t) dt
which integrates to
x = 2 PI f0 t + 2 PI k t**2 / 2 + c
where c is the integration constant.
Then y = M sin (2 PI f0 t + 2 PI k t**2 / 2 + c)
which is the correct model for a linear frequency changing sinusodal waveform.
My mistake was that I just change the frequency of the constant frequency
sinusodal equation from
y = M sin (2 PI f0 t + c)
to
y = M sin (2 PI (f0 + k t) t + c)
which expands to
y = M sin (2 PI f0 t + 2 PI k t**2 + c)
and is incorrect.
You can see the 1/2 factor is missing in the incorrect equation. Very
interesting! Thanks a million to all of you. I appreciate it.
Jim
--
Jim Chan
Hearing Lab
Communication Sciences and Disorders
School of Special Education