Skip to content

Elementary Matrices and Arrays

Built-in functions › Mathematics › Elementary Matrices and Arrays

19 functions in this category.

FunctionWhat it does
eyeIdentity matrix.
falseLogical array of all false.
ind2subConvert a linear index to N-dimensional subscripts.
infArray of Inf values.
linspaceVector of equally spaced points between two endpoints.
logspaceVector of logarithmically (base-10) spaced points.
magicMagic square — square matrix where every row, column, and diagonal sums to the same value.
nanArray of NaN values.
onesArray of all ones.
pascalPascal matrix — symmetric matrix of binomial coefficients.
randUniformly distributed random numbers in [0, 1].
randhRandom Hermitian (complex symmetric) matrix.
randiUniformly distributed random integers.
randnStandard-normal random numbers (mean 0, variance 1).
randsRandom symmetric matrix.
stringsArray of empty strings.
sub2indConvert N-dimensional subscripts to a single linear index.
trueLogical array of all true.
zerosArray of all zeros.