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

New to MATLAB?

How to enter data into Table in GUI?

Asked by Arun Badigannavar

Arun Badigannavar

on 26 Mar 2013
Accepted Answer by Walter Roberson

Walter Roberson

How to enter set of data into table?

1 Comment

Arun Badigannavar

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

Arun Badigannavar

Tags

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson

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

Walter Roberson

Contact us