9
votes
2answers
388 views

Speeding up construction of simple tridiagonal matrix

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