Menu

[Solved]Write Function Checks Whether Matrix Tridiagonal Tridiagonal Matrix Nonzero Elements Main Q37111167

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 o

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 your function will be a matrix. Use loops and if statements to check if the matrix is tridiagonal or not. When I run your program it should display a sentence stating whether the matrix is tridiagonal or not. Call the function tri_check_yourlastname Test your program with these two matrices a) 2 -1 0 0 4 3 -3 0 0 5 -1 8 0 0 4 3 b) 2 -1 1 0 4 3 -3 0 0 5 -1 8 6 0 4 3 Show transcribed image text 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 your function will be a matrix. Use loops and if statements to check if the matrix is tridiagonal or not. When I run your program it should display a sentence stating whether the matrix is tridiagonal or not. Call the function tri_check_yourlastname Test your program with these two matrices a) 2 -1 0 0 4 3 -3 0 0 5 -1 8 0 0 4 3 b) 2 -1 1 0 4 3 -3 0 0 5 -1 8 6 0 4 3

Expert Answer


Answer to Write a function that checks whether a matrix is tridiagonal or not. A tridiagonal matrix is such that has nonzero eleme… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *