For a 2nd order linear and non linear differential equation trigonal matrix is generated. In my case upper diagonals are 1 and lower diagonals are 1 and the main diagonal 5. What is the code to solve this type of problem for matrix of 161 x 161?
Solving the tridiagonal matrix is somewhat trivial in Matlab if you utilize the backslash "\" operator to perform the calculation along with defining your A matrix as a sparse data type. Search "matlab sparse matrices" for help with that.
once we have made tridiagonal matrix with upper and lower as well as main diagonal,Cant we use EIG function directly to calculate eigen value,will it be right or wrong.