__Title__

**SPMATbanded*()** -- Banded matrix operators

__Syntax__

*real matrix* **SPMATbandedmake(***real matrix A***,** *real scalar lb***,** *real scalar*
*ub***)**

*real matrix* **SPMATbandedunmake(***real matrix A***,** *real scalar lb***,** *real scalar*
*ub***)**

*void* **_SPMATbandedtranspose(***real matrix A***,** *real scalar lb***,** *real scalar ub***)**

*real matrix* **SPMATbandedplus(***real matrix A***,** *real scalar lb1***,** *real scalar*
*ub1***,** *real matrix B***,** *real scalar lb2***,** *real scalar ub2***)**

*real matrix* **SPMATbandedminus(***real matrix A***,** *real scalar lb1***,** *real scalar*
*ub1***,** *real matrix B***,** *real scalar lb2***,** *real scalar ub2***)**

*real scalar* **SPMATbandedtrace(***real matrix A***,** *real scalar lb***,** *real scalar*
*ub***)**

*real scalar* **SPMATbandedtracemult(***real matrix A***,** *real scalar lb1***,** *real*
*scalar ub1***,** *real matrix B***,** *real scalar lb2***,** *real scalar ub2***)**

*real matrix* **SPMATbandedcross(***real matrix A***,** *real scalar lb***,** *real scalar*
*ub***)**

*real matrix* **SPMATbandedmult(***real matrix A***,** *real scalar lb1***,** *real scalar*
*ub1***,** *real matrix B***,** *real scalar lb2***,** *real scalar ub2***)**

*real matrix* **SPMATbandedmultfull(***real matrix A***,** *real scalar lb1***,** *real*
*scalar ub1***,** *real matrix X***)**

__Description__

These functions create and perform operations on banded matrices.

**SPMATbandedmake()** takes an *n x n* matrix *A* and returns a banded matrix
with lower band *lb* and upper band *ub*.

**SPMATbandedunmake()** takes a *b x n* banded matrix *A* with lower band *lb* and
upper band *ub* and returns an *n x n* matrix.

**_SPMATbandedtranspose()** returns the transposed banded matrix *A* with lower
band *lb* and upper band *ub*.

**SPMATbandedplus()** performs matrix addition on the banded matrices *A* and
*B*.

**SPMATbandedminus()** performs matrix subtraction on the banded matrices *A*
and *B*.

**SPMATbandedtrace()** returns the trace of the banded matrix *A*.

**SPMATbandedtracemult()** returns **trace(***A*******B***)** of the banded matrices *A* and *B*.

**SPMATbandedcross()** returns **cross(***A,A***)** with the matrix *A* stored in a
banded form.

**SPMATbandedmult()** performs matrix multiplication on the banded matrices *A*
and *B*.

**SPMATbandedmultfull()** performs matrix multiplication on the banded matrix
*A* and an *n x k* matrix *X*.

__Conformability__

**SPMATbandedmake()**:
*A*: *n x n*
*result*: *b x n* where *b* = *lb*** + 1 + ***ub*

**SPMATbandedunmake()**:
*A*: *b x n* where *b* = *lb*** + 1 + ***ub*
*result*: *n x n*

**_SPMATbandedtranspose()**:
*A*: *b x n*
*result*: *b x n*

**SPMATbandedplus()**, **SPMATbandedminus()**:
*A*: *b1 x n* where *b1* = *lb1*** + 1 + ***ub1*
*B*: *b2 x n* where *b2* = *lb2*** + 1 + ***ub2*
*result*: *b x n* where *b* = **max(***lb1***,***lb2***) + 1 + max(***ub1***,***ub2***)**

**SPMATbandedtrace()**:
*A*: *b x n*
*result*: 1 *x* 1

**SPMATbandedtracemult()**:
*A*: *b1 x n*
*B*: *b2 x n*
*result*: 1 *x* 1

**SPMATbandedmult()**:
*A*: *b1 x n* where *b1* = *lb1*** + 1 + ***ub1*
*B*: *b2 x n* where *b2* = *lb2*** + 1 + ***ub2*
*result*: *b x n* where *b* = **(***lb1***+***lb2***) + 1 + (***ub1***+***ub2***)**

**SPMATbandedcross()**:
*A*: *b1 x n* where *b1* = *lb1*** + 1 + ***ub1*
*result*: *b x n* where *b* = **(***lb1***+***ub1***) + 1 + (***lb1***+***ub1***)**

**SPMATbandedmultfull()**:
*A*: *b x n*
*X*: *n x k*
*result*: *n x k*

__Diagnostics__

None.

__Source code__

Functions are built in.