MATLAB Answers


How to enter data into Table in GUI?

How to enter set of data into table?

  1 Comment

  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?



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) )


Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!