Skip to contents

Function written to match MATLAB's size function

Usage

size(obj, dimension.index = NULL)

Arguments

obj

An object you want to know the various dimensions of. Typically a matrix.

dimension.index

Which dimension you are interested in.

Value

The dimensions of the object or specific dimension you are interested in.

See also

Other MATLAB: cell(), diag_matlab(), feval(), fileparts(), isempty(), ones(), rand(), randn(), tic(), toc(), zeros()

Examples


size(c(2,3,4,5,6))
#> [1] 1 5

size(10)
#> [1] 1 1

size(zeros(4,7))
#> [1] 4 7