No BSD License  

Highlights from
Signals & Systems: Continuous and Discrete, 4e Companion Software

from Signals & Systems: Continuous and Discrete, 4e Companion Software by Rodger Ziemer
Companion Software for Signals & Systems: Continuous and Discrete, 4e

c2ex8.m
%	Example 2-8
%
del_t = .005;
t = -2:del_t:4;
L = length(t);
tp = [2*t(1):del_t:2*t(L)];
x = 2*(pls_fn(t+.5)-pls_fn(t-.5));
h = .5*rmp_fn(t).*stp_fn(2-t);
y = del_t*conv(x, h);
subplot(3,1,1), plot(t, x), xlabel('t'), ylabel('x(t)'), axis([t(1) t(L) -3 3])
subplot(3,1,2), plot(t, h), xlabel('t'), ylabel('h(t)'), axis([t(1) t(L) 0 2])
subplot(3,1,3), plot(tp, y),xlabel('t'), ylabel('y(t)'), axis([t(1) t(L) -2 2])

Contact us at files@mathworks.com