# Cell Arrays

Cell arrays are generic data containers.

They are similar to matrices in that they have rows and columns, and specific elements can be accessed via one or more indices. The major difference is that the data in cell arrays does not have to be homogeneous. A cell can store a matrix, string, scalar, or even another cell array.

`a={ [1,2;3,4], 'hello'; 5,[1,2,3] }`

`a`is a 2x2 cell array.

`a{2,1} => 5`

```
a(2,2) = { [1,2,3]}
a{2,2} = [1,2,3]
```

These two
statements are equivalent.The size function can be used to determine the number of rows and columns in a cell array (just like for other entities).

`a(2,2) = {[]}`

`a{2,2} = []`

`a={}`