# Create Cell Array

This example shows how to create a cell array using the `{}` operator or the `cell` function.

When you have data to put into a cell array, create the array using the cell array construction operator, `{}`.

```myCell = {1, 2, 3; 'text', rand(5,10,2), {11; 22; 33}}```
```myCell=2×3 cell array {[ 1]} {[ 2]} {[ 3]} {'text'} {5x10x2 double} {3x1 cell} ```

Like all MATLAB® arrays, cell arrays are rectangular, with the same number of cells in each row. `myCell` is a 2-by-3 cell array.

You also can use the `{}` operator to create an empty 0-by-0 cell array.

`C = {}`
```C = 0x0 empty cell array ```

To add values to a cell array over time or in a loop, create an empty `N`-dimensional array using the `cell` function.

`emptyCell = cell(3,4,2)`
```emptyCell = 3x4x2 cell array emptyCell(:,:,1) = {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} emptyCell(:,:,2) = {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} {0x0 double} ```

`emptyCell` is a 3-by-4-by-2 cell array, where each cell contains an empty array, `[]`.
{"ft_lang_label":"__label__en","ft_lang_prob":0.5128003,"math_prob":0.9369725,"size":1169,"snap":"2021-43-2021-49","text_gpt3_token_len":411,"char_repetition_ratio":0.3527897,"word_repetition_ratio":0.20792079,"special_character_ratio":0.3746792,"punctuation_ratio":0.1375,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96957463,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-24T01:30:47Z\",\"WARC-Record-ID\":\"<urn:uuid:8f680922-c9e6-4129-bd7c-74a0a47206b9>\",\"Content-Length\":\"69924\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:61ffb2df-9cd9-487b-bbe3-c868be6ecd07>\",\"WARC-Concurrent-To\":\"<urn:uuid:ad7c2c3e-45c2-42b4-aef9-6b732967a5a9>\",\"WARC-IP-Address\":\"104.104.91.201\",\"WARC-Target-URI\":\"https://fr.mathworks.com/help/matlab/matlab_prog/create-a-cell-array.html\",\"WARC-Payload-Digest\":\"sha1:WNBFHTKJJQ653AWF6HP3QGO3QM5VDZ4V\",\"WARC-Block-Digest\":\"sha1:N6T3G5KDLNFTHPPGGPMTQM7COUIHQ2XY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585828.15_warc_CC-MAIN-20211023224247-20211024014247-00089.warc.gz\"}"}