<< display Utilities sort >>

Scilab Scholar module for schools >> Utilities > size_of

size_of

number of components in a vector or matrix

t = size_of(v)

Arguments

v

vector or matrix

t

number or vector of two numbers

Description

If v is a vector, size_of(v) returns its number of components.

If v is a matrix of dimension m X n, size_of(v) returns the vector [m,n].

Note that for an empty matrix [], the number of components is 0.

Examples

v=[1,2,3]
size_of(v)
v=[1,2,3;4,5,6]
size_of(v)
<< display Utilities sort >>