Discrete sine function programming
jkchan at rodan.acs.syr.edu
jkchan at rodan.acs.syr.edu
Sat Oct 20 05:59:16 AEST 1990
I am programming a frequency varying sin function like:
y = sin ( 2 PI (f+df)(t+dt)/sf)
where
PI=3.14159
f=initial frequency
df=delta change of frequency
t=time
df=delta change of time
sf=sampling frequency = # of sample points/sec
The problem is that the final waveform of y is not varying as what I like.
I used 1000Hz and 2000Hz for initial and final f respectively but
it actually gave 3000Hz at the end, or something like that.
Are there anyone who have met this situation and fixed it before?
I am sure it is due to the discrete computation of the function because
this problem of frequency modulation does not happen in analog world.
Any pointer is much appreciated.
Please email to the above address.
Thanks in advance.
Jim
--
Jim Chan
Hearing Lab
Communication Sciences and Disorders
School of Special Education
More information about the Comp.unix.programmer
mailing list