www.pudn.com > OQPSK.rar > lpf.m, change:2013-03-12,size:508b


function [t,st]=lpf(f,sf,B) 
%       f: frequency samples  
%      sf: input data spectrum samples 
%       B: lowpass's bandwidth with a rectangle lowpass 
% output:	 
%       t: sample 
%      st: output data's time samples 
 
df = f(2)-f(1); 
T = 1/df; 
hf = zeros(1,length(f)); 
bf = [-floor(B/df):floor(B/df)]+floor(length(f)/2); 
%规定低通滤波器的宽度 
hf(bf) = 1;                    %低通滤波器为理想的矩形窗,其加权值为1 
yf = hf .* sf;                %频域的相乘 
[t,st] = F2T(f,yf); 
st = real(st);