简体   繁体   中英

How do I display a table which has another table as a variable in app designer app in Matlab?

The code below generates a matlab table which has another table as one of its variables.

test = [1;2;3];
test2 = [5;6;7];
test3 = [9;10;11];
tmp = table(test, test2, test3);
merged = mergevars(tmp,{'test','test2'},'NewVariableName','Combined','MergeAsTable',true);

I want to display a similar table in an app I am building in app designer. I do not find any info how to do that. I would be very grateful for any suggestions.

app.UITable.Data = merged 

does generate an empty table in the GUI. Thanks!

Referring to another table in Matlab app designer has some limitation. You can do it for every normal table, but if you have a merged column in your table, you can't do it. I have tried it before. It is impossible in "UITable" to use a merged column. You could do it at the Java level.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM