MATLAB: How to print contents of nested cell array to uitable

cell arraysMATLABuitable

I have a nested cell array A of 1x3cell and which further contains cell arrays of different dimensions like 2×1, 18×1, 15×1 and so on.. What i would like to do is display this nested cell array data into an uitable with first coloumn of uitable containing first element of A, second column containing second element of A and so on…
I have tried first of all, trying to un-nest the cell array A, using
horzcat(A{:});
so i could then use it for 'Data' of uitable , but it throws "Dimensions are inconsistent" ofcourse.
Also i have tried following:
table = uitable('Parent', gcf,'Data',A{:,:});
or
table = uitable('Parent', gcf,'Data',A{:,:}{:,:});
But unfortunately, none of them works out.. any help would be appreciated.

Best Answer

I think the best thing to do is make another cell array, B, as follows:
nRows = max(cellfun(@numel,A))
nCols = numel(A)
B = cell(nRows,nCols);
for c = 1:nCols
B(:,c) = vertcat(A{1,c},cell(nRows - numel(A{1,c}),1));
end
This array can then be put into the uitable.
fig = uifigure;
uit = uitable(fig,'Data',B);
EDIT: I had indeed misread the question.