tripuls函数:

产生一个三角形的单脉冲信号。有三个参数,三种调用形式:

调用形式 参数含义
y=tripuls(T) T是一个数组,表示信号时间。
y=tripuls(T, w) w是三角波的宽度。
y=tripuls(T, w, s) s是三角波是斜率(-1<s<1)。
figure;
fs = 10e3;
t = -0.1:1/fs:0.1;
subplot(2,2,1)
plot(t,tripuls(t));         % 图1
title('图1');
subplot(2,2,2)
w=0.04;
plot(t,tripuls(t,w));       % 图2
title('图2');
subplot(2,2,3)
plot(t,tripuls(t,w,0.8));   % 图3
title('图3');
subplot(2,2,4)
plot(t,tripuls(t,w,-0.6));  % 图4
title('图4');

matlab产生三角波——tripuls()

相关文章: