Question

Please show using MATLAB 7. Obtain the convolution of the pairs of signals in Figure 7 h(t) a(t) 0 2 h(t) r(t) 0 0 Figure 7: Signal pairsAnswerTherefore, y(t) = 0 otherwise

7. Obtain the convolution of the pairs of signals in Figure 7 h(t) a(t) 0 2 h(t) r(t) 0 0 Figure 7: Signal pairs
Therefore, y(t) = 0 otherwise
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB:

1)


clc;close all;clear all;
t=0:0.001:2
x=(t>=0 &t<=1)
h=(t>=0 &t<=1)+(-1*(t>=1 &t<=2))
t1=0:0.001:4
y=conv(x,h)
figure(1)
subplot(311)
plot(t,x,'b','linewidth',3)
title('Input x(t)')
xlabel('t');ylabel('x(t)')
xlim([0,4]);ylim([-1,1])

subplot(312)
plot(t,h,'m','linewidth',3)
title('Impulse response h(t)')
xlabel('t');ylabel('h(t)');xlim([0,4])

subplot(313)
plot(t1,y/max(y),'r','linewidth',3)
title('Output y(t)')
xlabel('t');ylabel('y(t)');xlim([0,4])

figure(2)
%verify with the given answer
t=0:0.01:5
y=(t.*(t>=0 &t<1))+((3-(2*t)).*(t>=1 & t<2))+((t-3).*(t>=2 &t<=3))
plot(t,y,'r','linewidth',3)
title('Output y(t)')
xlabel('t');ylabel('y(t)');

Input x(t) 0.5 0.5 2 3 4 Impulse response h(t) 0.5 0.5 2 3 4 Output y(t) 0.5 -0.5 2 3 4

Output y(t) 0.5 0.5

2)


clc;close all;clear all;
t=0:0.001:6
x=t.*(t>=0 &t<=1)
h=(t>=2 &t<=5)
t1=0:0.001:12
y=conv(x,h)
subplot(311)
plot(t,x,'b','linewidth',3)
title('Input x(t)')
xlabel('t');ylabel('x(t)')
ylim([0,2]);xlim([0,2])

subplot(312)
plot(t,h,'m','linewidth',3)
title('Impulse response h(t)')
xlabel('t');ylabel('h(t)');
ylim([0,2]);xlim([0,6])

subplot(313)
plot(t1,y/max(y),'r','linewidth',3)
title('Output y(t)')
xlabel('t');ylabel('y(t)');
ylim([0,2])

Input x(t) 1.5 0.5 0.5 1.5 2 Impulse response h(t) 1.5 0.5 3 4 6 Output y(t) 2 1.5 F ג1 0.5 10 2 4 8 12


Add a comment
Know the answer?
Add Answer to:
Please show using MATLAB Answer 7. Obtain the convolution of the pairs of signals in Figure 7 h(t) a(t) 0 2 h(t) r(t) 0 0 Figure 7: Signal pairs Therefore, y(t) = 0 otherwise 7. Obtain the convol...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT