📄 cp0902_effpulse.m
字号:
%
% Function 9.6: "cp0902_effpulse"
%
% Evaluates the effective pulse duration of the
% input waveform 'pulse' sampled with frequency 'fc'.
% 'pE' is the fraction of the original energy which must
% be considered for determining the effective duration.
%
% The function returns the waveform 'eff_pulse'
% which contains the fraction 'pE' of the original energy,
% and the time duration 'L' in seconds of 'eff_pulse'.
%
% Programmed by Guerino Giancola
%
function [eff_pulse,L] = cp0902_effpulse(pulse,fc,pE)
% -----------------------------------------------------
% Step One - Evaluation of the effective pulse duration
% -----------------------------------------------------
dt = 1 / fc;
T = length(pulse);
E = sum((pulse.^2).*dt);
Eeff = E*pE;
eff_pulse = pulse;
E0 = E;
T0 = T;
while (E0>Eeff)&(T0>2)
T0 = T0 - 2;
tmp = eff_pulse(2:length(eff_pulse)-1);
eff_pulse = tmp;
E0 = sum((eff_pulse.^2).*dt);
end % while E0 > Eeff
L = length(eff_pulse)*dt;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -