How to create a Toeplitz matrix?

조회 수: 5 (최근 30일)
Omar B.
Omar B. 2020년 2월 11일
댓글: Omar B. 2020년 2월 11일
How to create a symmetric positive definite Toeplitz matrix with entries ?

채택된 답변

Jon
Jon 2020년 2월 11일
편집: Jon 2020년 2월 11일
You can use MATLAB toeplitz function for this.
See the documentation by typing doc toeplitz on the command line.
Since your toeplitz matrix is symmetric you just need to define the first row, let's call it r and then use
A = toeplitz(r)
Using the formula you have given it should be quite straight forward to assign r. In your formula just set i = 1 since you just want to define the first row, and then let j go from 1 to 500. So something like
i = 1;
jCol = 1:500
r = 1./(1 + abs(1 - jCol)) % note ./ does element by element division
A = toeplitz(r)
  댓글 수: 1
Omar B.
Omar B. 2020년 2월 11일
Thank you very much. I got it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by