size

Type: External

Group: general

Syntax

[y, x] = size(matrix)
 z     = size(matrix, n)

Description

returns the size of a matrix.

Examples

size([1,2;3,4]) = [2,2]
size([1,2,3;4,5,6]) = [2,3]

a=rand(4,4,2)
size(a)  -> [4,4,2)

size(a,3) -> 2

See Also

rows, columns, row, col, ndims