App.UITable Problems

4 Ansichten (letzte 30 Tage)
Jasmin R
Jasmin R am 3 Mär. 2020
Bearbeitet: shubham bawankar am 16 Jul. 2020
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

Antworten (1)

shubham bawankar
shubham bawankar am 16 Jul. 2020
Bearbeitet: shubham bawankar am 16 Jul. 2020

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;

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by