MATLAB: How to set the title of a uitable

label;MATLABnamestyletext;titleuicontroluitable

I have a uitable that I created with the code below. 
f = figure;
t = uitable(f);
d = {'Male',52,true;'Male',40,true;'Female',25,false};
t.Data = d;
t.Position = [20 20 258 78];
t.ColumnName = {'Gender','Age','Authorized'};
I want to set the title for this uitable. How do I do this?  
 

Best Answer

Currently, the "uitable" does not have a "Title" property that can be set.
However, you can achieve the desired effect by placing a "uicontrol" of style "text" directly above the "uitable". 
As an example : 
f = figure;
t = uitable(f);
d = {'Male',52,true;'Male',40,true;'Female',25,false};
t.Data = d;
t.Position = [20 20 258 78];
t.ColumnName = {'Gender','Age','Authorized'};
txt_title = uicontrol('Style', 'text', 'Position', [20 100 200 20], 'String', 'My Example Title');