Clear Filters
Clear Filters

table gui, set parameters

2 views (last 30 days)
Margareta Drozdikova
Margareta Drozdikova on 11 Dec 2017
Answered: KL on 11 Dec 2017
Hi, I have created simple gui with table. First how to set number of row and columns. If I want 2 col and 5 row?? And how to display in the first row 1 16 in the second 1 15 and in the thirth row 1 14 ?? I have written this but it doesnt work, any help? thanks
data1=[1 16;1 15;1 14]; % t=uitable(data,'Databaza') col_nazov={'A','B'}; Ncolumns=2; Nrows=4; set(handles.uitable1,'data',cell(Nrows,Ncolumns)) set(handles.uitable1,'data',data1,'ColumnName',col_nazov); guidata(hObject, handles);

Accepted Answer

KL
KL on 11 Dec 2017
Fairly simple,
data1=[1 16;1 15;1 14];
t=uitable;
t.Data = data1;
t.ColumnName = {'A','B'}; %and so on

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!