size(v)
Returns the size of a matrix variable, the length of a list or string variable
Parameters
v:
A matrix, list or string variable
Return Value
Given a list or a string the length is returned as an integer. Given a matrix the size is returned as a list of two numbers representing the number of rows and columns, respectively.
Example command:
-
size("here I am")
-> Returns 9 -
size([1,2,3,4,5])
-> Returns 5 -
size([[1,2],[3,4],[5,6]])
-> Returns [3,2]