How to make convolution between two signals?

4 次查看(过去 30 天)
If I have x[n] = δ[n] + 2 δ[n-1]- 3 δ[n-4] and h[n] = 3 δ[n]+2 δ[n-1]. Plot x[n], h[n], and then plot the convolution x[n]*h[n].

回答(3 个)

Matt J
Matt J 2012-12-24

Muruganandham Subramanian

Wayne King
Wayne King 2012-12-24
x = [1 2 0 0 -3];
h = [3 2];
y = conv(x,h);
subplot(311)
stem(0:4,x,'markerfacecolor',[0 0 1])
set(gca,'xlim',[0 5]);
subplot(312)
stem(0:1,h,'markerfacecolor',[0 0 1])
set(gca,'xlim',[0 5]);
subplot(313)
stem(0:5,y,'markerfacecolor',[0 0 1])
set(gca,'xlim',[0 5]);
  2 个评论
Saso sasose
Saso sasose 2017-4-12
this is for (n ) but what would I do if I need continuous convolution
Matt J
Matt J 2017-4-12
编辑:Matt J 2017-4-12
That would be a symbolic operation. You could use the command int in the Symbolic Math Toolbox to implement the continuous convolution integrals symbolically.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by