9
votes
2answers
386 views

Speeding up construction of simple tridiagonal matrix

I have the following code to construct a tridiagonal matrix: ...