2013-04-24 38 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

相關問題