i can not get the convolution of two unit step signal correct
1 view (last 30 days)
Show older comments
%conv command
step = 0.01;
t1 = 0:step:3;
t2 = 3:step:5;
t = [t1 t2];
x1 = ones(size(t1));
x2 = ones(size(t2));
x = [x1,x2];
subplot(3,1,1)
plot(t,x,'m'),grid on
legend('x(t)')
subplot(3,1,2)
th = 0:step:4;
h1 = ones(size(th));
h2 = exp(-3).*th;
h = h2.*h1;
plot(th,h,'b'),grid on
legend('h(t)')
xlim([0 5])
subplot(3,1,3)
y = conv(x,h).*step;
yt = 0:step:6;
subplot(3,1,3)
plot(yt,y,'r'),grid on
legend('y(t)=x(t)*h(t)')
0 Comments
Answers (0)
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!