isbanded

Determine if matrix is within specific bandwidth.

Syntax

  • tf = isbanded(A, lower, upper)

Input argument

  • A - Input matrix

  • lower, upper - lower bandwidth,

Output argument

  • tf - logical

Description

tf = isbanded(A, lower, upper) returns true if matrix A is within the specified lower bandwidth, lower, and upper bandwidth, upper.

Example

M = [1 0 0 0 0; 2 1 0 0 0; 3 2 1 0 0]
TF = isbanded(M, 2, 0)
TF = isbanded(M, 2, 1)

See also

bandwidth.

History

Version
Description

1.0.0

initial version

Author

Allan CORNET

Last updated