Construction of shifted matrix from known matrix

1 回表示 (過去 30 日間)
Abdul Sajeed Mohammed
Abdul Sajeed Mohammed 2020 年 11 月 17 日
コメント済み: Ameer Hamza 2020 年 11 月 17 日
I have matrix 'h' which is of matrix 2056. I need to build matrix 'H' using shifted version of 'h'.
Construction example : Suppose an impulse responce has length of 6 :
h = [h0 h1 h2 h3 h4 h5 h6] '
I need to change length to FIR filter length of 4 such as :
H = [ h0 0 0 0 ]
[ h1 h0 0 0 ]
[ h2 h1 h0 0 ]
[ h3 h2 h1 h0 ]
[ h4 h3 h2 h1 ]
[ h5 h4 h3 h2 ]
[ 0 h5 h4 h3 ]
[ 0 0 h5 h4 ]
[ 0 0 0 h5 ]
I need to produce this kind of matrix. Any help will be very useful. Thank you

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 17 日
編集済み: Ameer Hamza 2020 年 11 月 17 日
Try toeplitz()
h = 1:6;
m = 4;
n = numel(h)+m-1;
M = toeplitz([h zeros(1,m-1)], [h(1) zeros(1,m-1)])
Result
>> M
M =
1 0 0 0
2 1 0 0
3 2 1 0
4 3 2 1
5 4 3 2
6 5 4 3
0 6 5 4
0 0 6 5
0 0 0 6
  2 件のコメント
Abdul Sajeed Mohammed
Abdul Sajeed Mohammed 2020 年 11 月 17 日
Thank you very much worked for me.
Ameer Hamza
Ameer Hamza 2020 年 11 月 17 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by