MATLAB Function Reference |

Convert numeric array to cell array

**Syntax**

**Description**

```
c = num2cell(A)
```

converts the matrix `A`

into a cell array by placing each element of `A`

into a separate cell. Cell array `c`

will be the same size as matrix `A`

.

`c = num2cell(A, `

converts the matrix `dims`

)
`A`

into a cell array by placing the dimensions specified by `dims`

into separate cells. `C`

will be the same size as `A`

except that the dimensions matching `dims`

will be `1`

.

**Examples**

places the rows of `A`

into separate cells. Similarly

places the column-depth pages of `A`

into separate cells.

**See Also**

null | num2hex |

© 1994-2005 The MathWorks, Inc.