how to add a single element to a table in app designer ?
조회 수: 15 (최근 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!