📄 pulse.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -