%% Asymmetric Sawtooth Waveform
% This example generates an asymmetric sawtooth waveform with a repetition frequency of 3 Hz. The sawtooth has width 0.2 s and skew factor –1. The signal length is 1 s, and the sample rate is 1 kHz. Plot the pulse train.

fs = 1e3;
t = 0:1/1e3:1;
d = 0:1/3:1;   
x = tripuls(t,0.2,-1);
y = pulstran(t,d,x,fs);

plot(t,y)
hold off
xlabel('Time (s)')
ylabel('Waveform')

% Copyright 2015 The MathWorks, Inc.