📄 cp0901_sm2_pam.m
字号:
%
% Function 9.2: "cp0901_sm2_PAM"
%
% Evaluates the term SIGMAm^2 ('sm2') for an input 'pulse'
% sampled at 'fc'.
%
% Programmed by Guerino Giancola
%
function [sm2] = cp0901_sm2_PAM(pulse,fc)
% ---------------------------------
% Step One - Evaluation of SIGMAm^2
% ---------------------------------
dt = 1 / fc; % sampling period
pulse_samples = length(pulse);
% energy normalization
Ep = sum((pulse.^2).*dt);
pulse = pulse./sqrt(Ep);
LS = 3*pulse_samples;
pa = zeros(1,LS);
pb = zeros(1,LS);
pa(1:pulse_samples) = pulse;
pb(1:pulse_samples) = pulse;
for tau = 0 : (LS-1)
pc = cp0804_signalshift(pa,fc,tau*dt);
% result of the internal integration
I(tau+1) = (sum((pc.*pb).*dt))^2;
end % for tau = 0 : (LS-1)
sm2 = sum(I.*dt);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -