pulse.m
来自「《Digital and Analog Communications Syste」· M 代码 · 共 21 行
M
21 行
function w = pulse(w,t,tbegin,tend)
% FILE: PULSE.M
% CALL: w = pulse(w,t,tbegin,tend)
% This function creates a square pulse.
% t = Input vector that corresponds to the discrete time values.
% w = Input vector that corresponds to the waveform.
% tbegin = defines the left edge of the pulse.
% tend = defines the right edge of the pulse.
i = length(t);
for (i = 1:length(t))
if (t(i) >= tbegin & t(i) <= tend)
w(i) = 1;
end;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?