Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the simplified symbolic Convolution script below, Modify it to solve Pr

ID: 2079590 • Letter: C

Question

Consider the simplified symbolic Convolution script below, Modify it to solve Problem 3.8 f involving these two signals (f) x(t) e^-t u(t - 1) and h (t) 2u(t - 1) giving plots in the range [-1, 5] clear, close all % Define symbolic variables syms t tau; u(t) = beaviside (t) xas (t) = (exp (-t)) (u (t) % Input signal symbolic hss (t) = (u (t) -u (t-4)) % Impulse response symbolic % Compute the output yss (t) = int (xss (tau) * hss (t - tau), tau, - inf, inf); output different formats to the command window simplify (yss) expand (yss) collect (yss) Define a range of t s for numeric plot t left = -10; t right = 101 delta t = 0.01; tnum = tleft;deltat;.tright; % Convert symbolic to double variables for numeric plotting xs = subs(xss. t. tnua);xnum = double (xs); xmax = max(xnum); xmin=min (x num); % Max and min values of x hs = subs(hss, t. tnua);hnum = double(hs); hmax = max(y num); hmin=min(hnum); % Max and min values of h ys = subs(yss. t, tnum); ynum = double(ys); ymax - max(ynum); ymin=min (y num); % Max and Min values of y % Plot the input, impulse response, and output Figure; subplot(3, 1, 1); plot(tnum, xnum); title('x(t)'); grid; axis([tleft tright xmin-0.l*xmin xmax+0.1*xmax]); subplot(3, 1.2); plot(tnum, hnum); title('h(t)*); grid; axis([tleft tright h min-0 .l*hmin hmax*0.1*hmax)); subplot(3, 1, 3)i plotltnum, ynum); title('y(t)*); grid; axis([t left t right ymin-0.1*ymin ymax + 0.1*ymax));

Explanation / Answer

clear, close all;

syms t tau;
u=heaviside(t);

xss(t)=(exp(-t))*(u(t));

hss(t)=2*(u(t-1));

yss(t)=int(xss(tau)*hss(t-tau),tau,-inf,inf);

simplify(yss);
expand(yss);
collect(yss);

tleft = -1;
tright = 5;
deltat = 0.01;

tnum = tleft:deltat:tright;

xs = subs(xss,t,tnum);
xnum = double(xs);
xmax = max(xnum);
xmin = min(xnum);

hs = subs(hss,t,tnum);
hnum = double(hs);
hmax = max(hnum);
hmin = min(hnum);

ys = subs(yss,t,tnum);
ynum = double(ys);
ymax = max(ynum);
ymin = min(ynum);

Figure;

subplot(3,1,1);
plot(tnum,xnum);
title('x(t)');
grid;
axis([tleft tright xmin-0.1*xmin xmax+0.1*xmax]);

subplot(3,1,2);
plot(tnum,hnum);
title('h(t)');
grid;
axis([tleft tright hmin-0.1*hmin hmax+0.1*hmax]);

subplot(3,1,3);
plot(tnum,ynum);
title('y(t)');
grid;
axis([tleft tright ymin-0.1*ymin ymax+0.1*ymax]);