App.UITable Problems

조회 수: 8 (최근 30일)
Jasmin R
Jasmin R 2020년 3월 3일
편집: shubham bawankar 2020년 7월 16일
Hi guys,
I am new here and to Matlab. I just started with App Designer and need help now, because I don't find any answers regarding my problem.
I've created an app.uitable, which has two columns (X and Y). The X column is filled with different intervals (the user defines that). That works good so far, just had to adjust the array/vectors from row to column.
Now the problem, the Y column. I have a button which will get values from a different program, that values needs to be filled into the Y column, one after another, everytime you press the button and the actual value which you get from the other program is shown in an Edit Field (non editable).
So how can I get that values into the second (Y) colums of the app.UITable. I am working with the "new" App Designer in Matlab 2018b.
The first (X) column is filled like this:
function GenerierenButtonPushed(app, event)
start = app.start_x.Value;
stop = app.stop_x.Value;
step = app.step_x.Value;
intervalrow = start:step:stop;
intervalcol = transpose(intervalrow);
app.UITable.Data = intervalcol;
end
I started the code for the second column like this, to if getting the value is working, but don't have any clue how to go on from here:
function WerteholenButtonPushed(app, event)
y = app.WertEditField.Value;
app.UITable.Data = y
end
That puts the EditField Value into the first column and first row (as expected).
Any help would be appreciated.
Thanks in advance.
Regards, Jasmin

답변 (1개)

shubham bawankar
shubham bawankar 2020년 7월 16일
편집: shubham bawankar 2020년 7월 16일

If you want to put data in 2nd column, and say a row given by row_index, it should be like app.UITable.Data{2,row_index} = y;

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by