%% Create Cell Array
% When related pieces of data have different data types, you can keep them together in a cell array. Each cell contains a piece of data. To refer to elements of a cell array, use array indexing. You can index into a cell array using smooth parentheses, (), and into the contents of cells using curly braces, {}.
% Create a cell array that contains several temperature readings taken on a given date. Specify a date as a character vector, and temperatures as an array of doubles. To store these pieces of data in a cell array, enclose them in curly braces.

C = {'2017-08-16',[56 67 78]}

%
% Add readings for different dates to the cell array. One way to add more cells is to expand the cell array by assignment, just as you can expand an ordinary array.

C(2,:) = {'2017-08-17',[58 69 79]};
C(3,:) = {'2017-08-18',[60 68 81]}

%
% Index into the first row of C. When you index with smooth parentheses, (), the result is a cell array that is a subset of the cell array.

C(1,:)

%
% Index into the contents of a cell. When you index with curly braces, {}, the result is the piece of data that is contained in the specified cell.

C{1,2}

% Copyright 2012 The MathWorks, Inc.