| Home | | | Quick start | | | Cookbook | | | All symbols | | | Analytical index | | | Namespaces | | | Syntax | | | Statements | | | CX | | | Frequency | | | Functions | | | Examples | | | Examples by command |
Linear algebra and Eigen-backed matrix/vector operations.
Symbols in this namespace: 47
| Symbol | Kind | Category | Description |
|---|---|---|---|
LA.ADD | Function | Linear algebra / Eigen | Element-wise matrix addition; A and B must have the same shape. |
LA.COL | Function | Linear algebra / Eigen | Creates an n x 1 column vector. It can still be read with one index, for example c[0]. |
LA.COLS | Function | Linear algebra / Eigen | Returns the number of columns. A 1D vector reports cols = 1. |
LA.COS | Function | Linear algebra / Eigen | Element-wise cosine. |
LA.CROSS | Function | Linear algebra / Eigen | Cross product between two 3D vectors. |
LA.DET | Function | Linear algebra / Eigen | Returns the determinant of a square matrix. |
LA.DIAG | Function | Linear algebra / Eigen | Vector input creates a diagonal matrix; matrix input extracts the diagonal. |
LA.DOT | Function | Linear algebra / Eigen | Dot product between same-size vectors. |
LA.EIGSYM_VALS | Function | Linear algebra / Eigen | Returns real eigenvalues for symmetric matrices. |
LA.EIGSYM_VECS | Function | Linear algebra / Eigen | Returns real eigenvectors for symmetric matrices. |
LA.EIGVALS | Function | Linear algebra / Eigen | Returns eigenvalues as an N x 2 table: real and imaginary part. |
LA.EIGVECS | Function | Linear algebra / Eigen | Returns real eigenvectors when the decomposition has negligible imaginary components. |
LA.EXP | Function | Linear algebra / Eigen | Element-wise exponential. |
LA.FROM_IMAGE | Function | Linear algebra / Eigen | Converts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance. |
LA.GRID_X | Function | Linear algebra / Eigen | Builds the X coordinate matrix for a regular grid. |
LA.GRID_Y | Function | Linear algebra / Eigen | Builds the Y coordinate matrix for a regular grid. |
LA.HADAMARD | Function | Linear algebra / Eigen | Element-wise matrix product. |
LA.IDENTITY | Function | Linear algebra / Eigen | Creates an n x n identity matrix. |
LA.INV | Function | Linear algebra / Eigen | Returns the inverse of a non-singular square matrix. |
LA.LINSPACE | Function | Linear algebra / Eigen | Creates a 1D vector with n evenly spaced samples from a to b. |
LA.LSQ | Function | Linear algebra / Eigen | Least-squares solution for overdetermined systems. |
LA.MUL | Function | Linear algebra / Eigen | Matrix product using Eigen. |
LA.NORM | Function | Linear algebra / Eigen | Returns the Frobenius/vector norm. |
LA.NULLSPACE | Function | Linear algebra / Eigen | 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. |
LA.ONES | Function | Linear algebra / Eigen | Creates a numeric matrix initialized to one. |
LA.PINV | Function | Linear algebra / Eigen | Returns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted. |
LA.QR_Q | Function | Linear algebra / Eigen | Returns the Q factor of the Householder QR decomposition. |
LA.QR_R | Function | Linear algebra / Eigen | Returns the R factor of the Householder QR decomposition, with Q*R reconstructing A. |
LA.RANK | Function | Linear algebra / Eigen | Returns the numerical rank of A using its singular values. |
LA.ROW | Function | Linear algebra / Eigen | Creates a 1 x n row vector. It can still be read with one index, for example r[0]. |
LA.ROWS | Function | Linear algebra / Eigen | Returns the number of rows. A 1D vector reports rows = length. |
LA.SCALE | Function | Linear algebra / Eigen | Multiplies all matrix elements by scalar s. |
LA.SHAPE | Function | Linear algebra / Eigen | Returns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2. |
LA.SIN | Function | Linear algebra / Eigen | Element-wise sine. |
LA.SINC | Function | Linear algebra / Eigen | Element-wise sin(x)/x with the correct value 1 near zero. |
LA.SOLVE | Function | Linear algebra / Eigen | Solves A*x=b with Eigen QR decomposition. |
LA.SQRT | Function | Linear algebra / Eigen | Element-wise square root. |
LA.SUB | Function | Linear algebra / Eigen | Element-wise matrix subtraction; A and B must have the same shape. |
LA.SVD_S | Function | Linear algebra / Eigen | Returns the singular values of A. |
LA.SVD_U | Function | Linear algebra / Eigen | Returns the thin U matrix from the singular value decomposition A = U*S*V^T. |
LA.SVD_V | Function | Linear algebra / Eigen | Returns the thin V matrix from the singular value decomposition A = U*S*V^T. |
LA.TO_IMAGE | Function | Linear algebra / Eigen | Converts a numeric matrix to a grayscale image, optionally normalized to 0..255. |
LA.TRACE | Function | Linear algebra / Eigen | Returns the sum of the diagonal of A. |
LA.TRANSPOSE | Function | Linear algebra / Eigen | Returns the transpose of a vector or matrix. |
LA.VEC | Function | Linear algebra / Eigen | Creates a compact 1D numeric vector. Direct indexing works as v[0]. |
LA.VERSION | Function | Linear algebra / Eigen | Returns the Eigen version detected at compile time. |
LA.ZEROS | Function | Linear algebra / Eigen | Creates a numeric matrix initialized to zero. |
LA.ADD(A, B)
Element-wise matrix addition; A and B must have the same shape.
value = LA.ADD(A, B)LA.COL(v0 [, v1 ...])
Creates an n x 1 column vector. It can still be read with one index, for example c[0].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
v1 | Optional parameter. If omitted, the command uses its internal default. |
c = LA.COL(3, 2, 1)
PRINT LA.SHAPE(c), c[1]LA.COLS(A)
Returns the number of columns. A 1D vector reports cols = 1.
value = LA.COLS(A)LA.COS(A)
Element-wise cosine.
value = LA.COS(A)LA.CROSS(a, b)
Cross product between two 3D vectors.
value = LA.CROSS(a, b)LA.DET(A)
Returns the determinant of a square matrix.
value = LA.DET(A)LA.DIAG(vectorOrMatrix)
Vector input creates a diagonal matrix; matrix input extracts the diagonal.
value = LA.DIAG(vectorOrMatrix)LA.DOT(a, b)
Dot product between same-size vectors.
value = LA.DOT(a, b)LA.EIGSYM_VALS(A)
Returns real eigenvalues for symmetric matrices.
value = LA.EIGSYM_VALS(A)LA.EIGSYM_VECS(A)
Returns real eigenvectors for symmetric matrices.
value = LA.EIGSYM_VECS(A)LA.EIGVALS(A)
Returns eigenvalues as an N x 2 table: real and imaginary part.
value = LA.EIGVALS(A)LA.EIGVECS(A)
Returns real eigenvectors when the decomposition has negligible imaginary components.
value = LA.EIGVECS(A)LA.EXP(A)
Element-wise exponential.
value = LA.EXP(A)LA.FROM_IMAGE(image [, channel])
Converts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
channel | Zero-based channel index; some commands accept -1 for grayscale/all channels. |
value = LA.FROM_IMAGE(image [, channel])LA.GRID_X(xVector, yVector)
Builds the X coordinate matrix for a regular grid.
value = LA.GRID_X(xVector, yVector)LA.GRID_Y(xVector, yVector)
Builds the Y coordinate matrix for a regular grid.
value = LA.GRID_Y(xVector, yVector)LA.HADAMARD(A, B)
Element-wise matrix product.
value = LA.HADAMARD(A, B)LA.IDENTITY(n)
Creates an n x n identity matrix.
I = LA.IDENTITY(4)LA.INV(A)
Returns the inverse of a non-singular square matrix.
value = LA.INV(A)LA.LINSPACE(a, b, n)
Creates a 1D vector with n evenly spaced samples from a to b.
xVec = LA.LINSPACE(-8, 8, 220)LA.LSQ(A, b)
Least-squares solution for overdetermined systems.
value = LA.LSQ(A, b)LA.MUL(A, B)
Matrix product using Eigen.
C = LA.MUL(A, B)LA.NORM(A)
Returns the Frobenius/vector norm.
value = LA.NORM(A)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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
tolerance | Optional parameter. If omitted, the command uses its internal default. |
value = LA.NULLSPACE(A [, tolerance])LA.ONES(rows [, cols])
Creates a numeric matrix initialized to one.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cols | Optional parameter. If omitted, the command uses its internal default. |
value = LA.ONES(rows [, cols])LA.PINV(A [, tolerance])
Returns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
tolerance | Optional parameter. If omitted, the command uses its internal default. |
Aplus = LA.PINV(A)
x = LA.MUL(Aplus, b)LA.QR_Q(A)
Returns the Q factor of the Householder QR decomposition.
value = LA.QR_Q(A)LA.QR_R(A)
Returns the R factor of the Householder QR decomposition, with Q*R reconstructing A.
value = LA.QR_R(A)LA.RANK(A [, tolerance])
Returns the numerical rank of A using its singular values.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
tolerance | Optional parameter. If omitted, the command uses its internal default. |
value = LA.RANK(A [, tolerance])LA.ROW(v0 [, v1 ...])
Creates a 1 x n row vector. It can still be read with one index, for example r[0].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
v1 | Optional parameter. If omitted, the command uses its internal default. |
r = LA.ROW(3, 2, 1)
PRINT LA.SHAPE(r), r[2]LA.ROWS(A)
Returns the number of rows. A 1D vector reports rows = length.
value = LA.ROWS(A)LA.SCALE(A, s)
Multiplies all matrix elements by scalar s.
value = LA.SCALE(A, s)LA.SHAPE(A)
Returns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2.
PRINT LA.SHAPE([[1,2],[3,4]])LA.SIN(A)
Element-wise sine.
value = LA.SIN(A)LA.SINC(A)
Element-wise sin(x)/x with the correct value 1 near zero.
value = LA.SINC(A)LA.SOLVE(A, b)
Solves A*x=b with Eigen QR decomposition.
value = LA.SOLVE(A, b)LA.SQRT(A)
Element-wise square root.
value = LA.SQRT(A)LA.SUB(A, B)
Element-wise matrix subtraction; A and B must have the same shape.
value = LA.SUB(A, B)LA.SVD_S(A)
Returns the singular values of A.
value = LA.SVD_S(A)LA.SVD_U(A)
Returns the thin U matrix from the singular value decomposition A = U*S*V^T.
value = LA.SVD_U(A)LA.SVD_V(A)
Returns the thin V matrix from the singular value decomposition A = U*S*V^T.
value = LA.SVD_V(A)LA.TO_IMAGE(A [, normalize])
Converts a numeric matrix to a grayscale image, optionally normalized to 0..255.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
normalize | Optional parameter. If omitted, the command uses its internal default. |
img = LA.TO_IMAGE(Z, TRUE)
GUI.SHOW img, "Matrix image"LA.TRACE(A)
Returns the sum of the diagonal of A.
value = LA.TRACE(A)LA.TRANSPOSE(A)
Returns the transpose of a vector or matrix.
value = LA.TRANSPOSE(A)LA.VEC(v0 [, v1 ...])
Creates a compact 1D numeric vector. Direct indexing works as v[0].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
v1 | Optional parameter. If omitted, the command uses its internal default. |
v = LA.VEC(3, 2, 1)
PRINT LA.SHAPE(v), v[0]LA.VERSION()
Returns the Eigen version detected at compile time.
PRINT LA.VERSION()LA.ZEROS(rows [, cols])
Creates a numeric matrix initialized to zero.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cols | Optional parameter. If omitted, the command uses its internal default. |
A = [[2, 1], [1, 3]]
b = [5, 6]
x = LA.SOLVE(A, b)
PRINT x[0], x[1]