How to create a Toeplitz matrix?

9 次查看(过去 30 天)
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)

更多回答(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