Today, I found this amazing site for Fortran tutorials - https://masuday.github.io/fortran_tutorial/index.html
I went through the tutorials which was organized in a very neat way. Then I proceeded to implement the following simple code.
Make a tridiagonal matrix with 1 on diagonal and 0 or on off-diagonal with an arbitrary $n$. See the following example for $n=5$. $$ \displaystyle{\begin{bmatrix} 1 & 0 & 0 & 0 & 0 \ 0 & 1 & 0 & 0 & 0 \ 0 & 0 & 1 & 0 & 0 \ 0 & 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 0 & 1 \end{bmatrix} } $$ The following is my implementation.
|
|