s = size(X)
sdim = size(X, dim)
vec = size(X, dims)
[r, c] = size(X)
[s1, ... , sn] = size(X)
| Parameter | Description |
|---|---|
| X | a variable |
| dim | a variable: a positive integer to get the dimth dimension. |
| dims | a variable: a vector of positive integer to get the dimth dimensions. |
| Parameter | Description |
|---|---|
| s | a row vector whose elements contain the length of the corresponding dimension of X. |
| sdim | the length of dimension dim. |
| vec | length of dimensions dims. |
| [r, c] | number of rows, and product of the remaining dimensions (number of columns for a matrix). |
| [s1, ... , sn] | length of each dimension; sn is the product of the remaining dimensions, and outputs beyond ndims(X) are 1. |
X = rand(3, 4, 5, 6);
size(X)
size(X, 3)
size(X, [2 4])
[r, c] =size(X)
[s1, s2, s3, s4] = size(X)
size(cell(4,3))
| Version | Description |
|---|---|
| 1.0.0 | initial version |