How to create this matrix shown in the screenshot?
3 views (last 30 days)
Show older comments
0 Comments
Accepted Answer
Prakash S R
on 27 Apr 2022
toeplitz() is your friend!
toeplitz([4 0 -2 0 0 0])
4 Comments
Torsten
on 27 Apr 2022
Logically, it should be
toeplitz([4, 0, -2, zeros(1,29)])
shouldn't it ?
More Answers (0)
See Also
Categories
Find more on Sparse Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!