Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How to enter data into Table in GUI?

Asked by Arun Badigannavar on 26 Mar 2013

How to enter set of data into table?

1 Comment

Arun Badigannavar on 26 Mar 2013
   a=10;
   b=20;
  f = figure('Position',[200 200 400 150]);
    dat =a,b; 
    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]);

how to enter a and b data into table?

Arun Badigannavar

Tags

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 26 Mar 2013
Accepted answer

Suppose you had a matrix named DATA that you wanted to set the uitable() to contain. Then,

set( Handle_of_uitable, 'data', num2cell(DATA) )

0 Comments

Walter Roberson

Contact us