LA namespace

Linear algebra and Eigen-backed matrix/vector operations.

Symbols in this namespace: 47

SymbolKindCategoryDescription
LA.ADDFunctionLinear algebra / EigenElement-wise matrix addition; A and B must have the same shape.
LA.COLFunctionLinear algebra / EigenCreates an n x 1 column vector. It can still be read with one index, for example c[0].
LA.COLSFunctionLinear algebra / EigenReturns the number of columns. A 1D vector reports cols = 1.
LA.COSFunctionLinear algebra / EigenElement-wise cosine.
LA.CROSSFunctionLinear algebra / EigenCross product between two 3D vectors.
LA.DETFunctionLinear algebra / EigenReturns the determinant of a square matrix.
LA.DIAGFunctionLinear algebra / EigenVector input creates a diagonal matrix; matrix input extracts the diagonal.
LA.DOTFunctionLinear algebra / EigenDot product between same-size vectors.
LA.EIGSYM_VALSFunctionLinear algebra / EigenReturns real eigenvalues for symmetric matrices.
LA.EIGSYM_VECSFunctionLinear algebra / EigenReturns real eigenvectors for symmetric matrices.
LA.EIGVALSFunctionLinear algebra / EigenReturns eigenvalues as an N x 2 table: real and imaginary part.
LA.EIGVECSFunctionLinear algebra / EigenReturns real eigenvectors when the decomposition has negligible imaginary components.
LA.EXPFunctionLinear algebra / EigenElement-wise exponential.
LA.FROM_IMAGEFunctionLinear algebra / EigenConverts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance.
LA.GRID_XFunctionLinear algebra / EigenBuilds the X coordinate matrix for a regular grid.
LA.GRID_YFunctionLinear algebra / EigenBuilds the Y coordinate matrix for a regular grid.
LA.HADAMARDFunctionLinear algebra / EigenElement-wise matrix product.
LA.IDENTITYFunctionLinear algebra / EigenCreates an n x n identity matrix.
LA.INVFunctionLinear algebra / EigenReturns the inverse of a non-singular square matrix.
LA.LINSPACEFunctionLinear algebra / EigenCreates a 1D vector with n evenly spaced samples from a to b.
LA.LSQFunctionLinear algebra / EigenLeast-squares solution for overdetermined systems.
LA.MULFunctionLinear algebra / EigenMatrix product using Eigen.
LA.NORMFunctionLinear algebra / EigenReturns the Frobenius/vector norm.
LA.NULLSPACEFunctionLinear algebra / EigenReturns a matrix whose columns form a numerical basis of the null space of A. Full-rank matrices return one zero column because zero-width arrays are not supported.
LA.ONESFunctionLinear algebra / EigenCreates a numeric matrix initialized to one.
LA.PINVFunctionLinear algebra / EigenReturns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted.
LA.QR_QFunctionLinear algebra / EigenReturns the Q factor of the Householder QR decomposition.
LA.QR_RFunctionLinear algebra / EigenReturns the R factor of the Householder QR decomposition, with Q*R reconstructing A.
LA.RANKFunctionLinear algebra / EigenReturns the numerical rank of A using its singular values.
LA.ROWFunctionLinear algebra / EigenCreates a 1 x n row vector. It can still be read with one index, for example r[0].
LA.ROWSFunctionLinear algebra / EigenReturns the number of rows. A 1D vector reports rows = length.
LA.SCALEFunctionLinear algebra / EigenMultiplies all matrix elements by scalar s.
LA.SHAPEFunctionLinear algebra / EigenReturns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2.
LA.SINFunctionLinear algebra / EigenElement-wise sine.
LA.SINCFunctionLinear algebra / EigenElement-wise sin(x)/x with the correct value 1 near zero.
LA.SOLVEFunctionLinear algebra / EigenSolves A*x=b with Eigen QR decomposition.
LA.SQRTFunctionLinear algebra / EigenElement-wise square root.
LA.SUBFunctionLinear algebra / EigenElement-wise matrix subtraction; A and B must have the same shape.
LA.SVD_SFunctionLinear algebra / EigenReturns the singular values of A.
LA.SVD_UFunctionLinear algebra / EigenReturns the thin U matrix from the singular value decomposition A = U*S*V^T.
LA.SVD_VFunctionLinear algebra / EigenReturns the thin V matrix from the singular value decomposition A = U*S*V^T.
LA.TO_IMAGEFunctionLinear algebra / EigenConverts a numeric matrix to a grayscale image, optionally normalized to 0..255.
LA.TRACEFunctionLinear algebra / EigenReturns the sum of the diagonal of A.
LA.TRANSPOSEFunctionLinear algebra / EigenReturns the transpose of a vector or matrix.
LA.VECFunctionLinear algebra / EigenCreates a compact 1D numeric vector. Direct indexing works as v[0].
LA.VERSIONFunctionLinear algebra / EigenReturns the Eigen version detected at compile time.
LA.ZEROSFunctionLinear algebra / EigenCreates a numeric matrix initialized to zero.

LA.ADD

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ADD(A, B)

Element-wise matrix addition; A and B must have the same shape.

Minimal example

value = LA.ADD(A, B)

LA.COL

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COL(v0 [, v1 ...])

Creates an n x 1 column vector. It can still be read with one index, for example c[0].

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
v1Optional parameter. If omitted, the command uses its internal default.

Minimal example

c = LA.COL(3, 2, 1)
PRINT LA.SHAPE(c), c[1]

LA.COLS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COLS(A)

Returns the number of columns. A 1D vector reports cols = 1.

Minimal example

value = LA.COLS(A)

LA.COS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COS(A)

Element-wise cosine.

Minimal example

value = LA.COS(A)

LA.CROSS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.CROSS(a, b)

Cross product between two 3D vectors.

Minimal example

value = LA.CROSS(a, b)

LA.DET

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DET(A)

Returns the determinant of a square matrix.

Minimal example

value = LA.DET(A)

LA.DIAG

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DIAG(vectorOrMatrix)

Vector input creates a diagonal matrix; matrix input extracts the diagonal.

Minimal example

value = LA.DIAG(vectorOrMatrix)

LA.DOT

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DOT(a, b)

Dot product between same-size vectors.

Minimal example

value = LA.DOT(a, b)

LA.EIGSYM_VALS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGSYM_VALS(A)

Returns real eigenvalues for symmetric matrices.

Minimal example

value = LA.EIGSYM_VALS(A)

LA.EIGSYM_VECS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGSYM_VECS(A)

Returns real eigenvectors for symmetric matrices.

Minimal example

value = LA.EIGSYM_VECS(A)

LA.EIGVALS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGVALS(A)

Returns eigenvalues as an N x 2 table: real and imaginary part.

Minimal example

value = LA.EIGVALS(A)

LA.EIGVECS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGVECS(A)

Returns real eigenvectors when the decomposition has negligible imaginary components.

Minimal example

value = LA.EIGVECS(A)

LA.EXP

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EXP(A)

Element-wise exponential.

Minimal example

value = LA.EXP(A)

LA.FROM_IMAGE

FUNCTIONLABATCH-FRIENDLYIMAGELINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.FROM_IMAGE(image [, channel])

Converts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
channelZero-based channel index; some commands accept -1 for grayscale/all channels.

Minimal example

value = LA.FROM_IMAGE(image [, channel])

LA.GRID_X

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.GRID_X(xVector, yVector)

Builds the X coordinate matrix for a regular grid.

Minimal example

value = LA.GRID_X(xVector, yVector)

LA.GRID_Y

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.GRID_Y(xVector, yVector)

Builds the Y coordinate matrix for a regular grid.

Minimal example

value = LA.GRID_Y(xVector, yVector)

LA.HADAMARD

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.HADAMARD(A, B)

Element-wise matrix product.

Minimal example

value = LA.HADAMARD(A, B)

LA.IDENTITY

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.IDENTITY(n)

Creates an n x n identity matrix.

Minimal example

I = LA.IDENTITY(4)

LA.INV

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.INV(A)

Returns the inverse of a non-singular square matrix.

Minimal example

value = LA.INV(A)

LA.LINSPACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.LINSPACE(a, b, n)

Creates a 1D vector with n evenly spaced samples from a to b.

Minimal example

xVec = LA.LINSPACE(-8, 8, 220)

LA.LSQ

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.LSQ(A, b)

Least-squares solution for overdetermined systems.

Minimal example

value = LA.LSQ(A, b)

LA.MUL

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.MUL(A, B)

Matrix product using Eigen.

Minimal example

C = LA.MUL(A, B)

LA.NORM

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.NORM(A)

Returns the Frobenius/vector norm.

Minimal example

value = LA.NORM(A)

LA.NULLSPACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.NULLSPACE(A [, tolerance])

Returns a matrix whose columns form a numerical basis of the null space of A. Full-rank matrices return one zero column because zero-width arrays are not supported.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
toleranceOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = LA.NULLSPACE(A [, tolerance])

LA.ONES

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ONES(rows [, cols])

Creates a numeric matrix initialized to one.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
colsOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = LA.ONES(rows [, cols])

LA.PINV

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.PINV(A [, tolerance])

Returns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
toleranceOptional parameter. If omitted, the command uses its internal default.

Minimal example

Aplus = LA.PINV(A)
x = LA.MUL(Aplus, b)

LA.QR_Q

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.QR_Q(A)

Returns the Q factor of the Householder QR decomposition.

Minimal example

value = LA.QR_Q(A)

LA.QR_R

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.QR_R(A)

Returns the R factor of the Householder QR decomposition, with Q*R reconstructing A.

Minimal example

value = LA.QR_R(A)

LA.RANK

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.RANK(A [, tolerance])

Returns the numerical rank of A using its singular values.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
toleranceOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = LA.RANK(A [, tolerance])

LA.ROW

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ROW(v0 [, v1 ...])

Creates a 1 x n row vector. It can still be read with one index, for example r[0].

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
v1Optional parameter. If omitted, the command uses its internal default.

Minimal example

r = LA.ROW(3, 2, 1)
PRINT LA.SHAPE(r), r[2]

LA.ROWS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ROWS(A)

Returns the number of rows. A 1D vector reports rows = length.

Minimal example

value = LA.ROWS(A)

LA.SCALE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SCALE(A, s)

Multiplies all matrix elements by scalar s.

Minimal example

value = LA.SCALE(A, s)

LA.SHAPE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SHAPE(A)

Returns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2.

Minimal example

PRINT LA.SHAPE([[1,2],[3,4]])

LA.SIN

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SIN(A)

Element-wise sine.

Minimal example

value = LA.SIN(A)

LA.SINC

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SINC(A)

Element-wise sin(x)/x with the correct value 1 near zero.

Minimal example

value = LA.SINC(A)

LA.SOLVE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SOLVE(A, b)

Solves A*x=b with Eigen QR decomposition.

Minimal example

value = LA.SOLVE(A, b)

LA.SQRT

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SQRT(A)

Element-wise square root.

Minimal example

value = LA.SQRT(A)

LA.SUB

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SUB(A, B)

Element-wise matrix subtraction; A and B must have the same shape.

Minimal example

value = LA.SUB(A, B)

LA.SVD_S

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_S(A)

Returns the singular values of A.

Minimal example

value = LA.SVD_S(A)

LA.SVD_U

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_U(A)

Returns the thin U matrix from the singular value decomposition A = U*S*V^T.

Minimal example

value = LA.SVD_U(A)

LA.SVD_V

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_V(A)

Returns the thin V matrix from the singular value decomposition A = U*S*V^T.

Minimal example

value = LA.SVD_V(A)

LA.TO_IMAGE

FUNCTIONLABATCH-FRIENDLYIMAGELINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TO_IMAGE(A [, normalize])

Converts a numeric matrix to a grayscale image, optionally normalized to 0..255.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
normalizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

img = LA.TO_IMAGE(Z, TRUE)
GUI.SHOW img, "Matrix image"

LA.TRACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TRACE(A)

Returns the sum of the diagonal of A.

Minimal example

value = LA.TRACE(A)

LA.TRANSPOSE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TRANSPOSE(A)

Returns the transpose of a vector or matrix.

Minimal example

value = LA.TRANSPOSE(A)

LA.VEC

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.VEC(v0 [, v1 ...])

Creates a compact 1D numeric vector. Direct indexing works as v[0].

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
v1Optional parameter. If omitted, the command uses its internal default.

Minimal example

v = LA.VEC(3, 2, 1)
PRINT LA.SHAPE(v), v[0]

LA.VERSION

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.VERSION()

Returns the Eigen version detected at compile time.

Minimal example

PRINT LA.VERSION()

LA.ZEROS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ZEROS(rows [, cols])

Creates a numeric matrix initialized to zero.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
colsOptional parameter. If omitted, the command uses its internal default.

Minimal example

A = [[2, 1], [1, 3]]
b = [5, 6]
x = LA.SOLVE(A, b)
PRINT x[0], x[1]