tripuls
Generate a sampled triangular pulse centered at zero, with a specified width and skew.
Syntax
p = tripuls(t)
p = tripuls(t, w)
p = tripuls(t, w, s)
Inputs
- t
- The times at which to generate the signal.
- w
- The pulse width. (default: 1)
- s
- The pulse skew, on the interval [-1, 1]. (default: 0)
Outputs
- p
- The triangular pulse.
Example
Plot a pulse of width 2 and skew 0.5, centered at t=3 on a 10 second interval, sampled at 100 Hz.
t = [0:0.01:10];
p = tripuls(t - 3, 2, 0.5);
plot(t, p);
xlabel ('Time (sec)');
ylabel ('Amplitude');

Figure 1. tripuls figure 1
Comments
tripuls is commonly used as an input to pulstran.