Toeplitz Matrix
8 ビュー (過去 30 日間)
古いコメントを表示
hunterilmenau Abdulkarim
2011 年 5 月 13 日
コメント済み: Sibo Van Gool
2021 年 10 月 8 日
Hallo all, I'm trying to create this matrix (Toeplitz Matrix):
1 0 0 0
2 1 0 0
3 2 1 0
0 3 2 1
0 0 3 2
0 0 0 3 how can I achieve that ?
thanks for help
0 件のコメント
採用された回答
Sean de Wolski
2011 年 5 月 13 日
T =tril(toeplitz([1 2 3 0 0 0 ],[1 2 3 0]))
2 件のコメント
Sean de Wolski
2011 年 5 月 13 日
Oleg's method is better because it doesn't require the call to tril:
v = 1:5;
T = toeplitz([v(:);zeros(numel(v),1)],zeros(numel(v)+1,1))
その他の回答 (2 件)
hunterilmenau Abdulkarim
2011 年 5 月 13 日
1 件のコメント
Sibo Van Gool
2021 年 10 月 8 日
For a more generalized version:
t = toeplitz([h zeros(1,length(h)-1)],[h(1) zeros(1, length(h)-1)])
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!