lpf.m

来自「通信中一些基本实验的程序AM、FM、ASK、FSK、PSK等等」· M 代码 · 共 15 行

M
15
字号
function [t,st]=lpf(f,sf,B)
%this function filter an input data using a lowpass filter
%inputs: f:frequency samples
%        sf:input data spectrum samples
%        B:lowpass's bandwidth with a rectangle lowpass
%Outputs: :t:time samples
%        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;
yf=hf.*sf;
[t,st]=F2T(f,yf);
st=real(st);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?