📄 gen_mtchd_fltr.m
字号:
function [correlator] = gen_mtchd_fltr(Ns, m, h)
% sqwang's source code, used for academic research, not commerce.
% This function can generate CPFSK correlator(matched filter);
% [correlator] = gen_mtchd_fltr(Ns, m, h)
% input h: Modulation index
% input m: Size of modulation alphabet set
% input Ns: the number of sample per symbol
% output correlator: each clommn is a correlator correspoding to each modulation symbol.
% Generate CPFSK matched filter, the number is m.
acc_phase = zeros(Ns + 1, m);
for k = 1 : m % Index of the correlator group
for i = 2 : Ns + 1 % Index of the correlator phase track
acc_phase(i, k) = acc_phase(i - 1, k) + (2 * k - m - 1)/Ns;
end
end
correlator = exp(j * pi * h * acc_phase);
correlator(1, :) = [];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -