linear-algebra

Additional linear algebra code, including matrix functions.

Select category:

Vector functions

vec_projection
Compute the vector projection of a 3-vector onto another.

Matrix functions

cartprod
Computes the cartesian product of given column vectors ( row vectors ).
cod
Computes the complete orthogonal decomposition (COD) of the matrix A: A = Q*R*Z' Let A be an M-by-N matrix, and let 'K = min(M, N)'.
funm
Compute matrix equivalent of function F; F can be a function name or a function handle and A must be a square matrix.
lobpcg
Solves Hermitian partial eigenproblems using preconditioning.
ndcovlt
Computes an n-dimensional covariant linear transform of an n-d tensor, given a transformation matrix for each dimension.
rotparams
The function w = rotparams (r) - Inverse to rotv().
rotv
The functionrotv calculates a Matrix of rotation about V w/ angle |v| r = rotv(v [,ang])
smwsolve
Solves the square system '(A + U*V')*X == B', where U and V are matrices with several columns, using the Sherman-Morrison-Woodbury formula, so that a system with A as left-hand side is actually sol...
thfm
Trigonometric/hyperbolic functions of square matrix X.

Matrix factorization

nmf_bpas
Nonnegative Matrix Factorization by Alternating Nonnegativity Constrained Least Squares using Block Principal Pivoting/Active Set method.
nmf_pg
Non-negative matrix factorization by alternative non-negative least squares using projected gradients.

Block sparse matrices

@blksparse/blksparse
Construct a block sparse matrix.
@blksparse/blksize
Returns the block size of the matrix.
@blksparse/ctranspose
Returns the conjugate transpose of a block sparse matrix X.
@blksparse/display
Displays the block sparse matrix.
@blksparse/full
Converts a block sparse matrix to full.
@blksparse/ismatrix
Returns true (a blksparse object is a matrix).
@blksparse/isreal
Returns true if the array is non-complex.
@blksparse/issparse
Returns true since a blksparse is sparse by definition.
@blksparse/minus
Subtract two blksparse objects.
@blksparse/mldivide
Performs a left division with a block sparse matrix.
@blksparse/mrdivide
Performs a left division with a block sparse matrix.
@blksparse/mtimes
Multiplies a block sparse matrix with a full matrix, or two block sparse matrices.
@blksparse/plus
Add two blksparse objects.
@blksparse/size
Returns the size of the matrix.
@blksparse/sparse
Converts a block sparse matrix to (built-in) sparse.
@blksparse/subsref
Index elements from a blksparse object.
@blksparse/transpose
Returns the transpose of a block sparse matrix X.
@blksparse/uminus
Returns the negative of a block sparse matrix X.
@blksparse/uplus
Returns the unary plus of a block sparse matrix X.

Kronecker Products

@kronprod/kronprod
Construct a Kronecker product object.
@kronprod/columns
Return the number of columns in the Kronecker product KP.
@kronprod/ctranspose
The complex conjugate transpose of a Kronecker product.
@kronprod/det
Compute the determinant of a Kronecker product.
@kronprod/disp
Show the content of the Kronecker product KP.
@kronprod/display
Show the content of the Kronecker product KP.
@kronprod/full
Return the full matrix representation of the Kronecker product KP.
@kronprod/inv
Return the inverse of the Kronecker product KP.
@kronprod/iscomplex
Return true if the Kronecker product KP contains any complex values.
@kronprod/ismatrix
Return true to indicate that the Kronecker product KP always is a matrix.
@kronprod/isreal
Return true if the Kronecker product KP is real, i.e. has no imaginary components.
@kronprod/issparse
Return true if one of the matrices in the Kronecker product KP is sparse.
@kronprod/issquare
Return true if the Kronecker product KP is a square matrix.
@kronprod/minus
Return the difference between a Kronecker product and another matrix.
@kronprod/mldivide
Perform matrix left division.
@kronprod/mpower
Perform matrix power operation.
@kronprod/mtimes
Perform matrix multiplication operation.
@kronprod/numel
Return the number of elements in the Kronecker product KP.
@kronprod/plus
Return the sum of a Kronecker product and another matrix.
@kronprod/rank
Return the rank of the Kronecker product KP.
@kronprod/rdivide
Perform element-by-element right division.
@kronprod/rows
Return the number of rows in the Kronecker product KP.
@kronprod/size
Return the size of the Kronecker product KP as a vector.
@kronprod/size_equal
True if all input have same dimensions.
@kronprod/sparse
Return the Kronecker product KP represented as a sparse matrix.
@kronprod/times
Perform elemtn-by-element multiplication.
@kronprod/trace
Returns the trace of the Kronecker product KP.
@kronprod/transpose
Returns the transpose of the Kronecker product KP.
@kronprod/uminus
Returns the unary minus operator working on the Kronecker product KP.
@kronprod/uplus
Returns the unary plus operator working on the Kronecker product KP.

Circulant matrices

circulant_make_matrix
Produce a full circulant matrix given the first column.
circulant_matrix_vector_product
Fast, compact calculation of the product of a circulant matrix with a vector Given N*1 vectors V and X, return the matrix-vector product Y = CX, where C is the N*N circulant matrix that has V as it...
circulant_eig
Fast, compact calculation of eigenvalues and eigenvectors of a circulant matrix Given an N*1 vector V, return the eigenvalues LAMBDA and optionally eigenvectors VS of the N*N circulant matrix C tha...
circulant_inv
Fast, compact calculation of inverse of a circulant matrix Given an N*1 vector V, return the inverse C of the N*N circulant matrix C that has V as its first column The returned C is the first colum...

Package: linear-algebra