isbanded
Determines if the input is a banded matrix.
Syntax
b = isbanded(x, lower, upper)
Inputs
- x
- The object to check.
- lower
- The number of lower diagonals.
- upper
- The number of upper diagonals.
Outputs
- b
- A logical 1 when x is a banded matrix, and 0 otherwise.
Example
m = diag(ones(1,10), 12, 10);
m(3, 7) = 1;
b = isbanded(m, 4, 3)
b = 1