Compute convolution y[n]=x[n]*h[n]: x[n]={2,0,1,-1,3}; h[n]={1,2,0,1}

58 ビュー (過去 30 日間)
Li Hui Chew
Li Hui Chew 2021 年 6 月 24 日
編集済み: Paul 2023 年 12 月 3 日
My approach:
x=[2 0 1 -1 3];
h=[1 2 0 1];
% therefore
y=conv(x,h)
y =
2 4 1 3 1 7 -1 3
  4 件のコメント
Walter Roberson
Walter Roberson 2023 年 12 月 2 日
It would depend on whether that u[n-1] is the unit step function or not.
If it is then x[n] would be 0 for n < 0, and 1 for n >= 0 -- an infinite stream of 1's. And h[n] would be 0 for n <= 1, and 0.9^n for n > 1 -- an infinite stream of non-negative numbers. You cannot express that as a finite convolution sequence.
Let us see what it would turn out like for continuous functions:
sympref('heavisideatorigin', 1)
ans = 
1
syms n integer
x(n) = heaviside(n)
x(n) = 
h(n) = (sym(9)/sym(10))^n * heaviside(n-1)
h(n) = 
syms t tau
C(t) = int(x(tau) * h(t-tau), tau, 0, t)
C(t) = 
[C(-1), C(0), C(1)]
ans = 
assume(sign(t-1) == 1)
simplify(C)
ans(t) = 
Paul
Paul 2023 年 12 月 2 日
編集済み: Paul 2023 年 12 月 3 日
The follow-up problem posed by James can be solved for a closed form solution using symsum and the shift property of the convolution sum. Seem like a HW problem so won't show it now.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2023 年 12 月 2 日
@Li Hui Chew, yes your approach is correct. Is that all you wanted - confirmation of your approach?

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by