Function reference · Math

size

Returns the dimensions of a vector, matrix, set or dictionary.

The result is a vector: the length of a vector, or the rows and columns of a matrix.

Notation

size(value)

Write it in an expression: nerdamer('size([a,b,c])'), or in the Playground.

Parameters

value
Vector, matrix, set, collection, or dictionary whose dimensions should be returned.

Examples

A vector's length.

size([a,b,c])
// → [3]
Open in Playground

A matrix's rows and columns.

size(matrix([1,2,3],[4,5,6]))
// → [2, 3]
Open in Playground

← Back to Function reference