Convolution of to matrices

3 ビュー (過去 30 日間)
Christi Louw
Christi Louw 2020 年 8 月 4 日
編集済み: Bruno Luong 2020 年 8 月 4 日
I'm looking for a way to input these vectors in matlab and get the same answer
  1 件のコメント
KSSV
KSSV 2020 年 8 月 4 日
Read about conv2.

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

採用された回答

Bruno Luong
Bruno Luong 2020 年 8 月 4 日
編集済み: Bruno Luong 2020 年 8 月 4 日
Example
t1 = 0:2;
A1 = [0.25 0.5 0.25];
t2 = [0 3 6];
A2 = [0.25 0.5 0.25];
Code for convolution vector Y (t,A) (I don't know what mean "shaper") of two "impulse" signals (t1,A1) and (t2,A2)
A = A1(:).*A2(:).';
[t,~,i] = uniquetol(t1(:)+t2(:)');
A = accumarray(i(:),A(:)).';
t = t.';
Y = [A;t]
Result
Y =
0.0625 0.1250 0.0625 0.1250 0.2500 0.1250 0.0625 0.1250 0.0625
0 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by