Creating a tridiagonal matrix
Show older comments
I am currently trying to create a 500*500 matrix in matlab with diagonals a=-1, b=4, c=2. My teacher has said that the best way to go about it is using loops, but is there a coded in function to use?
2 Comments
David Goodmanson
on 11 Nov 2019
Hi Aaron
check out the 'diag' function
Alex Treat
on 30 Oct 2020
coughs you were in the mec 103 class at CSU...
Accepted Answer
More Answers (0)
Categories
Find more on Operating on Diagonal 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!