How to display a variable for x and y values from code in UI Table

조회 수: 1 (최근 30일)
Hanrich de Kock
Hanrich de Kock 2020년 5월 28일
답변: Ameer Hamza 2020년 5월 28일
As i have calcualted values for x1,x2 and x3 as well as y1,y2 and y3 in my code under the specific table call back function...
how can i display this this results in a UI table with headers(x-values,y-values).
for example
x-values y-values
x1 y1
x2 y2
x3 y3

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 5월 28일
Run this example
x1 = 1; x2 = 2; x3 = 3;
y1 = 4; y2 = 5; y3 = 6;
x = [x1; x2; x3];
y = [y1; y2; y3];
t = table(x, y);
fig = uifigure;
uit = uitable(fig, 'Data', t)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by