Functions

f
cat(
dim: number,
...args: (number | array | matrix)[]
): array | matrix

Concatenates arrays and matrices along the specified dimension.

f
clone<T extends numarraymatrix>(x: T): T

Create a clone of the input array or matrix.

f
colon(
start: number,
end: number,
step?: number
): array

Generates an array of numbers from start to end with a specified step.

f
diag(
x: array | matrix,
k?: number
): array | matrix
4 overloads

Diagonal matrix creation and extraction of diagonals from a matrix.

f
end(
x: number | array | matrix,
dim?: number
): number | array

Returns the last index in an array or matrix.

f
falses(...args: (number | array)[]): matrix<boolean>

Creates an array or matrix filled with false.

f
find(x: array<boolean | number> | matrix<boolean | number>): array

Finds the indices of nonzero (true) elements in an array or matrix.

f
flipdim(
x: number | array | matrix,
dim?: number
): number | array | matrix

Flip the order of elements in an array or matrix.

f
getcol(
x: matrix,
n: number
): array

Get a column of a matrix.

f
f
horzcat(...args: (number | array | matrix)[]): array | matrix

Concatenate arrays or matrices horizontally.

f
ind2sub(
size: array,
index: number | array
): array | matrix

Converts linear index to row and column subscripts.

f
iscolumn(x: unknown): x is matrix

Checks if the input is a column vector.

f
isrow(x: unknown): x is matrix

Checks if the input is a row vector.

f
issquare(x: unknown): boolean

Checks if the input is a square matrix.

f
length(x:
string
| number
| array<string | number>
| matrix<string | number>
): number

Gets the length of a vector or the largest array dimension.

f
f
logspace(
a: number,
b: number,
n?: number
): array

Create logarithmically spaced arrays.

f
mergesort(
x: array | [array, array],
mode?: string
): [array, array]

Sort array in ascending or descending order.

f
ncols(x: array | matrix): number

Returns the number of columns in an array or matrix.

f
ndims(x: array | matrix): number

Number of array dimensions.

f
nrows(x: array | matrix): number

Returns the number of rows in an array or matrix.

f
numel(x: array | matrix): number

Number of elements in an array or matrix.

f
rand(...args: unknown[]): number | matrix
4 overloads

Uniformly distributed pseudorandom numbers.

f
reshape(
x: array | matrix,
m: number,
n: number,
flag?: 0 | 1
): matrix

Reshape an array or matrix into a new matrix of given dimensions.

f
size(x: unknown): array

Size of an N-D array.

f
sort(
x: unknown,
mode?: string,
dim?: number
): unknown
3 overloads

Sorts an array or matrix in ascending or descending order.

f
squeeze<T>(x: NestedArray<T>): NestedArray<T>

Removes singleton dimensions from arrays or matrices.

f
sub2ind(
size: array,
index: array | matrix
): number | array

Converts 2D subscripts to linear indices.

f
subsetlin(
m: unknown,
idx: unknown,
flag?: 0 | 1
): unknown
2 overloads

Extracts elements from an array or matrix based on linear indexing.

f
f
vertcat(...args: (numarraymatrix)[]): array | matrix

Concatenates arrays or matrices vertically.

Usage

import * as matarrs__Matrix_and_array_creation__manipulation__and_transformation_functions___This_module_provides_utilities_for____Matrix_creation__zeros__ones__eye__rand__linspace__logspace__etc_____Matrix_manipulation__reshape__transpose__flip__squeeze__repmat__etc_____Matrix_querying__size__length__ndims__nrows__ncols__numel__etc_____Matrix_access__getcol__getrow__setcol__setrow__subset__diag__etc_____Matrix_concatenation__cat__horzcat__vertcat____Index_conversion__sub_ind__ind_sub__find____Matrix_properties__iscolumn__isrow__issquare____Sorting_and_cloning__sort__mergesort__clone_ from "matarrs/index.ts";