From: M Powers on 24 Mar 2010 11:21 Hi, I have some waveforms in MATLAB with a DC offset that I want to filter out. I based this filter off of a first order analog prototype but am getting unexpected results. I assumed that the implicit periodicity of the DFT would cause the offset of the waveform in the code below to be a DC component. Instead, I get results that apparently treat the offset as a step response to the high pass filter. Is this an intrinsic limitation of the DFT? Advice is appreciated. MATLAB code: fs = 5e9; t = -50e-9:1/fs:50e-9; DCOffset = 0.5; wfm = 0.5 * rectpuls(t,2e-9) + DCOffset; %analog prototype cutoffFreq = 1e6; timeConst = 1 / (cutoffFreq * 2 * pi); aNum = [timeConst 0]; aDen = [timeConst 1]; [dNum, dDen] = bilinear(aNum, aDen, fs); fwfm = filter(dNum, dDen, wfm);
|
Pages: 1 Prev: Specify image subregion for xcorr2 Next: Fit curves to two data sets |