Documente Academic
Documente Profesional
Documente Cultură
Date:13/08/2018
Syntax:
y = tripuls(T); returns a continuous, aperiodic, symmetric, unity-height triangular pulse at
the times indicated in array T, centered about T=0 and with a default width of 1.
y = tripuls(T,w); generates a triangular pulse of width w.
y = tripuls(T,w,s) generates a triangular pulse with skew s, where –1 ≤ s ≤ 1. When s is 0, a
symmetric triangular pulse is generated.
(ii)Rectangular pulse
Syntax:
y = rectpuls(t); returns a continuous, aperiodic, unity-height rectangular pulse at the sample
times indicated in array t, centered about t = 0 and with a default width of 1. Note that the
interval of nonzero amplitude is defined to be open on the right, that is, rectpuls(-
0.5) = 1 while rectpuls(0.5) = 0.
y = rectpuls(t,w) generates a rectangle of width w.
MATLAB PROGRAM:
w=2;
s=0;
y1=tripuls(t,w,s); %triangular pulse
subplot(3,2,5);
plot(t,y1);
axis([-2.5 2.5 0 1.5]);
xlabel('Time(sec)');
ylabel('Amplitude');
title('Aperiodic Triangular Wave');
1 1
Amplitude
Amplitude
0 0
-1 -1
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
Time(sec) Time(sec)
Periodic Sawtooth Wave Periodic Square Wave
1 1
Amplitude
Amplitude
0 0
-1 -1
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
Time(sec) Time(sec)
Aperiodic Triangular Wave Aperiodic Rectangular Wave
1.5 1.5
Amplitude
Amplitude
1 1
0.5 0.5
0 0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
Time(sec) Time(sec)