%% Add Cells to Cell Array
% This example shows how to add cells to a cell array.
% Create a 1-by-3 cell array.

C = {1, 2, 3}

%
% Assign data to a cell outside the current dimensions. MATLAB® expands the cell array to a rectangle that includes the specified subscripts. Any intervening cells contain empty arrays.

C{4,4} = 44

%
% Add cells without specifying a value by assigning an empty array as the contents of a cell. C is now a 5-by-5 cell array.

C{5,5} = []

% Copyright 2012 The MathWorks, Inc.