MATLAB 帮助中心
本页翻译不是最新的。点击此处可查看最新英文版本。
采样的非周期性三角形
y = tripuls(t)
y = tripuls(t,w,s)
y = tripuls(t) 返回一个以数组 t 中指示的采样时间采样的连续非周期性的对称单位高度三角形脉冲,该矩形脉冲以 t = 0 为中心。
y
t
0
y = tripuls(t,w,s) 生成宽度为 w、偏斜为 s 的三角形。
w
s
示例
全部折叠
生成 200 毫秒的对称三角形脉冲,其采样率为 10 kHz,宽度为 40 毫秒。
fs = 10e3; t = -0.1:1/fs:0.1; w = 40e-3; x = tripuls(t,w);
生成同一脉冲的两个变体:
一个变体向过去位移 45 毫秒,向左倾斜 45%。
tpast = -45e-3; spast = -0.45; xpast = tripuls(t-tpast,w,spast);
一个变体向将来位移 60 毫秒,宽度减半,并完全向右偏斜。
tfutr = 60e-3; sfutr = 1; xfutr = tripuls(t-tfutr,w/2,sfutr);
在同一坐标区上绘制原始脉冲和两个副本。
plot(t,x,t,xpast,t,xfutr) ylim([-0.2 1.2])
单位三角形脉冲的采样时间,指定为向量。
数据类型: single | double
single
double
1
三角形宽度,指定为正数。
三角形偏斜,指定为实数,满足 –1 ≤ s ≤ 1。当 s 为 0 时,该函数生成一个对称三角形脉冲。
单位振幅的三角形脉冲,以向量形式返回。
全部展开
在 R2006a 之前推出
chirp | cos | diric | gauspuls | pulstran | rectpuls | sawtooth | sin | square
chirp
cos
diric
gauspuls
pulstran
rectpuls
sawtooth
sin
square
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处