Construction of shifted matrix from known matrix
9 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!