Module matrix_functions

Source

Modules§

read_write

Functions§

diag
This function can be used in two distinct ways.
eye_double_input
Returns the identity matrix, specifying the number of rows and columns separately.
eye_single_input
Returns an identity matrix. If argument is a single number, then the output is a square matrix. The argument can also be an array specifying the dimensions separately.
flatten
Returns the contents of a multidimensional array as a 1-D array.
fliplr
Flip a matrix left-to-right
flipud
Flip a matrix up-down
hessenberg
Calculates the QR decomposition of a matrix
horzcat
Concatenate two arrays horizontally.
invert_matrix
Calculates the inverse of a matrix. Fails if the matrix if not invertible, or if the elements of the matrix aren’t FLOAT or INT.
linspace
Returns an array containing a number of elements linearly spaced between two bounds.
logspace
Returns an array containing a number of elements logarithmically spaced between two bounds.
matrix_eigs_alt
Calculate the eigenvalues and eigenvectors for a matrix. Specifically, the output is an object map with entries for real_eigenvalues, imaginary_eigenvalues, eigenvectors, and residuals.
matrix_size_by_reference
Returns an array indicating the size of the matrix along each dimension, passed by reference.
meshgrid
Returns an object map containing 2-D grid coordinates based on the uni-axial coordinates contained in arguments x and y.
mtimes
Perform matrix multiplication.
ndims_by_reference
Return the number of dimensions in matrix, passed by reference.
nnz_by_reference
Returns the number of non-zero elements in a matrix, passed by reference.
numel_by_reference
Returns the number of elements in a matrix, passed by reference.
ones_double_input
Return a matrix of ones. Arguments indicate the number of rows and columns in the matrix.
ones_single_input
Return a matrix of ones. Can be called with a single integer argument (indicating the square matrix of that size) or with an array argument (indicating the size for each dimension).
qr_decomp
Calculates the QR decomposition of a matrix
rand_double_input
Return a matrix of random values, each between zero and one. Arguments indicate the number of rows and columns in the matrix.
rand_single_input
Returns a matrix of random values, each between zero and one. Can be called with a single integer argument (indicating the square matrix of that size) or with an array argument (indicating the size for each dimension).
repmat
Repeats copies of a matrix
rot90_ktimes
Rotate a matrix counterclockwise k times
rot90_once
Rotate a matrix counterclockwise once
svd_decomp
Calculates the singular value decomposition of a matrix
transpose
Transposes a matrix.
vertcat
Concatenates two array vertically.
zeros_double_input
Return a matrix of zeros. Arguments indicate the number of rows and columns in the matrix.
zeros_single_input
Return a matrix of zeros. Can be called with a single integer argument (indicating the square matrix of that size) or with an array argument (indicating the size for each dimension).