How to make a code using flip & slide method and without using conv function ?

7 ビュー (過去 30 日間)
argyn ramz
argyn ramz 2019 年 8 月 3 日
編集済み: Image Analyst 2019 年 8 月 4 日
Example given, depends on how many user inputs: x = [userinputs]
x = [1 2 3];
h = [4 5 6];
Illustration pattern of the 5 element-by-element products (summing produces the convolution)
1 2 3
6 5 4 %first element is 4
1 2 3
6 5 4 %2nd element is 5+8
1 2 3
6 5 4 %3rd element is 6+10+12
1 2 3
6 5 4 %4th element is 12+15
1 2 3
6 5 4 %5th element is 18
  4 件のコメント
madhan ravi
madhan ravi 2019 年 8 月 4 日
Why do you keep editing the question multiple times without responding to any of the comments or answers??
argyn ramz
argyn ramz 2019 年 8 月 4 日
I mean without using conv function, https://www.youtube.com/watch?v=Wzu3y9mVTQo

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

採用された回答

Image Analyst
Image Analyst 2019 年 8 月 4 日
It's simply convolution:
x = [1 2 3];
h = [4 5 6];
output = conv(x, h)
output =
4 13 28 27 18
  1 件のコメント
Image Analyst
Image Analyst 2019 年 8 月 4 日
編集済み: Image Analyst 2019 年 8 月 4 日
If you don't want to use the conv() function, because it's your homework assignment (not ours), and want to write it yourself, you can do it with for loop(s). See my attached demo where I do it in 2-dimensions. It will be easy for you to adapt it to 1-D.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by