MATLAB code required. Please use functions.
Write a function that checks whether a matrix is tridiagonal or not. A tridiagonal matrix is such that has nonzero elements on its main diagonal, the first diagonal below this and the first diagonal above the main. Outside of this, all other elements are zeros. For example 2-1 0 0 4 3 -3 0 0 5-1 8 0 0 4 3 A is a tridiagonal matrix. The input parameter for
OR
OR