how to add a single element to a table in app designer ?
13 次查看(过去 30 天)
显示 更早的评论
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).
0 个评论
回答(1 个)
Sahithi Kanumarlapudi
2020-8-25
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
0 个评论
另请参阅
类别
在 Help Center 和 File 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!