|
Contents | Previous | Next | Subchapters |
| Syntax |
size(x) |
[m, n] = size(x) | |
size(x, d) | |
| See Also | rowdim , coldim |
size(x)
returns a two element integer row vector
with the first element equal to the number of rows in x
and the second element equal to the number of columns in x.
[m, n] = size(x)
sets the integer scalar m equal to
the number of rows in x and
the integer scalar n equal to
the number of columns in x.
size(x, d)
If d is equal to one,
returns an integer scalar equal to the number of rows in x.
If d is equal to two,
returns an integer scalar equal to the number of columns in x.
The argument d must be an integer, real or double-precision scalar
equal to one or two.
size( rand(2, 3) )
O-Matrix will reply
[ 2 , 3 ]