MATLAB: How to change size of uitable

changecolumnsrowssize;uitable

Hello everyone,
I have calculated a few values that I want to display in a table. Since I couldn't find any other tables for matlab I am now using uitable. The problem is that I have about 8 columns and only 2 rows. When the table is displayed it only shows me the first 3 columns and then I can scroll right to see my other values. Is there a way to make the displayed part of the table larger? I would like to see ALL my values right away!
Thanks alot!!

Best Answer

Hi,
you can resize the columns of your uitable.
once you have filled the table with your data, you can use the ColumnWidth parameter
something like :
figure;
data = rand(2,8);
u = uitable('Position',[20 20 500 70],'data',data)
pause(2)
set(u,'ColumnWidth',{50})
you can mix the use of the position and ColumnWidth parameters to get the result you prefer.