apply rc filter to a seris of digital data

3 views (last 30 days)
Yumeng
Yumeng on 19 Jan 2014
Edited: Yumeng on 19 Jan 2014
I want to filter a stream of digital data by RC low pass filter. However, as shown in the eyediagram of output data, the curve of dropping edge is wrong (the right one is shown in the 2nd figure).
Why is the dropping edge wrong? How can I fix it?
Thank you very much!
YY
function data_out_t = RCLPF( t, data_t, tconst)
data_f=fft(data_t);
%transfer function of RC low pass filter
H=1./(1+tconst*sqrt(-1)*2*pi*f);
%change the transfer function for fft
for i=1:length(H)/2
H(length(H)-i+1)=H(i);
end
data_out_f=data_f.*H;
data_out_t=ifft(data_out_f);
end
<<
>>

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!