In order to have custom Row/Column Names you have to pass a cell of strings (using {<names>}
) into the ColumnName
and RowName
properties of the uitable
. Here is an example directly from MatLab's uitable
documentation:
f = figure('Position',[200 200 400 150]);
dat = rand(3);
cnames = {'X-Data','Y-Data','Z-Data'}; % These are your column names
rnames = {'First','Second','Third'}; % These are your row names
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 360 100]);
When parsing you're file, be sure to create the lists as a cell of strings.