how to add a single element to a table in app designer ?

15 Ansichten (letzte 30 Tage)
LO
LO am 7 Jul. 2020
this line adds one element to the first cell of the table (if the content is numeric)
app.UITable.Data = [app.UITable.Data(:);app.EditField2.Value];
otherwise for non numeric data
app.UITable.Data = [{app.UITable.Data{1}};app.EditField2.Value]
the question is: how could I fill in values for each variable separately? let's say I have different edit-boxes in the GUI and I want values taken from those fields to be put in a table row upon pressing a button ? I know I could make an array of all vars and then paste it as a row, however I have a mix of numeric and string variables so I cannot put them together (and I would not want to convert numbers to strings for this).

Antworten (1)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi am 25 Aug. 2020
Hi,
From your question, I have understood that you would like to add non-numeric data and numeric data into uitable. Referring to the following example might help you.
And you can access each cell of the table using the index in a similar way how you index a matrix. Referring to the answer posted in the following post might give you some insight

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