B = resize(A, m)
B = resize(A, sz)
B = resize(A, sz, 'FillValue', v)
| Parameter | Description |
|---|---|
| A | the array to resize. |
| m | a scalar length, used to resize a vector. |
| sz | a size vector [m n ...] giving the size of the result. |
| v | the value used to fill added elements (default 0 for a numeric array). |
| Parameter | Description |
|---|---|
| B | the resized array, of the requested size and the class of A. |
resize returns an array of the requested size. Along each dimension, elements of A beyond the new size are dropped and positions beyond the original data are filled with a fill value, which is 0 for a numeric array unless 'FillValue' is given. A scalar size resizes the length of a vector and keeps its orientation.
resize([1 2 3], 6)
| Version | Description |
|---|---|
| 2.0.0 | Initial version. |