MATLAB: Problem with Table exportation!

table column export exportation figure

Hallo! I have this table wich consists of two columns one singe(AlplaParameter) and one double(ConfidenceInt)
I used this command in order export the table as figure
uitable('Data',T{:,:},'ColumnName',T.Properties.VariableNames,'RowName',T.Properties.RowNames,'Units', 'Normalized', 'Position',[0, 0, 1, 1]);
Unfortunatelly, the second column is transformed to two single columns leaving the column name empty. Here is a picture that illustates the problem:
How can I merge the title cells of 2nd and 3rd column?

Best Answer

That is not possible with uitable.
  • You can set the Data to a numeric array, in which case each array element will be made into a separate entry, same as if you had set the data to num2cell() of the numeric array
  • You can set the Data to a cell array. Each entry in the cell array must be either a numeric scalar or a logical scalar or a string() scalar or a character (row) vector. It is not possible to set an entry to be a 1 x 2 numeric array.
The closest you could get to this is to convert the entries for the dual column into character, such as
data = [num2cell(YourTable.AlpaParameter), cellstr(num2str(YourTable.ConfidenceInt))];
uitable(...', 'Data', data)