% Rick Duncan - ASN 3
% Assignment 3
%

syms t x a y h u l;
close

% define the unit step function over 1000 points
%
A1 = zeros(1,500);
A2 = ones(1,500);
A = [A1 A2];

% define a linear space of 1000 points
%
t= linspace(-5,5,1000);

% use a multiplicative combination to get h(t) = exp(-t)*u(t); plot
%
h1 = A .* exp(-t);
plot(t,h1);

% define a 1 second pulse as the signal; plot
A3 = zeros(1,500);
A4 = ones(1,100);
A5 = zeros(1,400);

x1 = [A3 A4 A5];

hold
plot(t,x1);

% use the internal matlab convolution function
%
y1 = conv2(x1,h1,'same')

% put this on a new figure (much different scale)
%
figure
plot(t,y1);

% end of file
%
