2013-04-24 56 views

回答

1

您可以将rownames作为char类型的列向量提供给uitable()。在输入对话框中输入'abcdef'

rnames = inputdlg('Supply rownames with no spaces'); 
rnames = rnames{1}'; 

检查uitable内:

f  = figure('Position',[200 200 400 150]); 
dat = rand(numel(rnames),3); 
cnames = {'X-Data','Y-Data','Z-Data'}; 
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,... 
      'RowName',rnames,'Position',[20 20 360 100]); 
+0

谢谢,工作完美。 – roldy 2013-04-24 23:19:26