MATLAB 帮助中心
采样的非周期性矩形
y = rectpuls(t)
y = rectpuls(t,w)
y = rectpuls(t) 返回一个以数组 t 中指示的采样时间采样的连续非周期性单位高度矩形脉冲,该矩形脉冲以 t = 0 为中心。
y
t
0
y = rectpuls(t,w) 生成一个宽度为 w 的矩形。
w
示例
全部折叠
生成 200 毫秒的矩形脉冲,其采样率为 10 kHz,宽度为 20 毫秒。
fs = 10e3; t = -0.1:1/fs:0.1; w = 20e-3; x = rectpuls(t,w);
生成该脉冲的两个副本:
一个副本向过去位移 45 毫秒。
tpast = -45e-3; xpast = rectpuls(t-tpast,w);
一个副本向将来位移 60 毫秒,且宽度减半。
tfutr = 60e-3; xfutr = rectpuls(t-tfutr,w/2);
在同一坐标区上绘制原始脉冲和两个副本。
plot(t,x,t,xpast,t,xfutr) ylim([-0.2 1.2])
单位矩形脉冲的采样时间,指定为向量。
数据类型: single | double
single
double
1
矩形宽度,指定为正数。
单位振幅的矩形脉冲,以向量形式返回。
注意
非零振幅的区间定义为在右侧开放,即 rectpuls(-0.5) = 1,而 rectpuls(0.5) = 0。
rectpuls(-0.5)
rectpuls(0.5)
rectpuls 可与脉冲序列生成函数 pulstran 结合使用。
rectpuls
pulstran
全部展开
在 R2006a 之前推出
chirp | cos | diric | gauspuls | pulstran | sawtooth | sin | sinc | square | tripuls
chirp
cos
diric
gauspuls
sawtooth
sin
sinc
square
tripuls
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处