i can not get the convolution of two unit step signal correct

조회 수: 3 (최근 30일)
aman ch
aman ch 2021년 6월 26일
%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개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by