Crash on filtering generated sine wave
Posted: Sun Aug 07, 2005 3:09 pm
I'm trying to estimate the roll off in dB for the bandpass filter by generating a 100 Hz sine wave and then setting the bandpass low cutoff just above 100Hz (150 Hz) and hi cut off at some 10s of kHz. But every time I try to bandpass filter the generated sine wave, DPlot crashes.
Details, I generate a sine wave with Y=sin(x) in degrees from 0 to 36000 degrees with one point every 5 degrees, the correct sine wave is generated. Then, I modify the X axis with X = X/36000 so that the X axis is labled from zero to 1 and modify axis lables to X as seconds and Y as psi.
An FFT on this sine wave yields a proper frequency spectrum with a single peak at 100 Hz. However, if I attempt to filter that sine wave with a bandpass filter with any settings - e.g., w/the low cut off set to 150 Hz and the high cut off set to 40000 Hz, Dplot crashes and disappears altogether.
The bandpass filter works well at the settings mentions and many others for other waveforms and recorded real data, so I cannot figure out what's going wrong.
John
Details, I generate a sine wave with Y=sin(x) in degrees from 0 to 36000 degrees with one point every 5 degrees, the correct sine wave is generated. Then, I modify the X axis with X = X/36000 so that the X axis is labled from zero to 1 and modify axis lables to X as seconds and Y as psi.
An FFT on this sine wave yields a proper frequency spectrum with a single peak at 100 Hz. However, if I attempt to filter that sine wave with a bandpass filter with any settings - e.g., w/the low cut off set to 150 Hz and the high cut off set to 40000 Hz, Dplot crashes and disappears altogether.
The bandpass filter works well at the settings mentions and many others for other waveforms and recorded real data, so I cannot figure out what's going wrong.
John