Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Determine if matrix is within specific bandwidth

`tf = isbanded(A,lower,upper)`

Use the

`bandwidth`

function to find the upper and lower bandwidths of a given matrix.Use

`isbanded`

to test for several different matrix structures by specifying appropriate upper and lower bandwidths. The table below lists some common tests.Lower Bandwidth

Upper Bandwidth

Function Call

Tests for

`0`

`0`

`isbanded(A,0,0)`

Diagonal matrix

`1`

`1`

`isbanded(A,1,1)`

Tridiagonal matrix

`0`

`size(A,2)`

`isbanded(A,0,size(A,2))`

Upper triangular matrix

`size(A,1)`

`0`

`isbanded(A,size(A,1),0)`

Lower triangular matrix

`1`

`size(A,2)`

`isbanded(A,1,size(A,2))`

Upper Hessenberg matrix

`size(A,1)`

`1`

`isbanded(A,size(A,1),1)`

Lower Hessenberg matrix