Toeplitz Matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
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!