%% Specify Array Dimensions with Size of Existing Array
% Create an array to store graphics handles using the size of an existing array.
% Define A as a 3-by-4 array.

A = [1,2,3,2; 4,5,6,6; 7,8,9,7];

%
% Create an array of graphics handles using the size of A.

v = size(A);
H = gobjects(v);

%
% The dimensions of the graphics handle array are the same as the dimensions of A.

isequal(size(H),size(A))

% Copyright 2015 The MathWorks, Inc.