MATLAB: Add a title to uitable

titletitle uitableuitable

Hi
Is is possible to add a title, like in a figure, onto a uitable ( http://www.mathworks.se/help/matlab/ref/uitable.html)?
Let's use the example from the site. Would it be possible to say that the title is "Confusion table"?
f = figure('Position',[200 200 400 150]);
dat = rand(3);
cnames = {'X-Data','Y-Data','Z-Data'};
rnames = {'First','Second','Third'};
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 360 100]);

Best Answer

Sorry, there is no property for that.
You could create a uicontrol('Style','text') and position it just above the uitable()
I did not suggest using text() here because text() needs to go on an axes, but uitable() and uicontrol() do not sit on axes (and look strange if you try to position them right where an axes also is.)