Input array, specified as a vector, matrix, or multidimensional
array.

**Data Types: **`single`

| `double`

| `int8`

| `int16`

| `int32`

| `int64`

| `uint8`

| `uint16`

| `uint32`

| `uint64`

| `logical`

| `char`

| `cell`

| `datetime`

| `duration`

| `calendarDuration`

**Complex Number Support: **Yes

Output size, specified as a row vector of integers. Each element
of `sz`

indicates the size of the corresponding dimension
in `B`

. You must specify `sz`

so
that the number of elements in `A`

and `B`

are
the same. That is, `prod(sz)`

must be the same as `numel(A)`

.

Beyond the second dimension, the output, `B`

,
does not reflect trailing dimensions with a size of `1`

.
For example, `reshape(A,[3,2,1,1])`

produces a 3-by-2
matrix.

**Example: **`reshape(A,[3,2])`

**Example: **`reshape(A,[6,4,10])`

**Example: **`reshape(A,[5,5,5,5])`

Size of each dimension, specified as two or more integers with
at most one `[]`

(optional). You must specify at
least 2 dimension sizes, and at most one dimension size can be specified
as `[]`

, which automatically calculates the size
of that dimension to ensure that `numel(B)`

matches `numel(A)`

.
When you use `[]`

to automatically calculate a dimension
size, the dimensions that you *do* explicitly specify
must divide evenly into the number of elements in the input matrix, `numel(A)`

.

Beyond the second dimension, the output, `B`

,
does not reflect trailing dimensions with a size of `1`

.
For example, `reshape(A,3,2,1,1)`

produces a 3-by-2
matrix.

**Example: **`reshape(A,3,2)`

**Example: **`reshape(A,6,[],10)`

**Example: **`reshape(A,2,5,3,[])`

**Example: **`reshape(A,5,5,5,5)`