How can I know the name of my table?

2 次查看(过去 30 天)
Hugo Garnier
Hugo Garnier 2021-11-12
回答: Dave B 2021-11-12
Hi everyone,
I try to code an application on Matlab App Designer. But I have a problem which is i want to transform my table in matrix with theses fonctions : my_table{:,:} or matrix = table2array(my_table) but I do not know the name of my table. Moreover, i tried to give name( i join this) to that with fonction but i think it doesn't work otherwise i am not here to ask question.
Thank you,

回答(1 个)

Dave B
Dave B 2021-11-12
This is confusing because the word table means a few things, and because it's not entirely clear what you meant by "my table". There's a uitable (the object that lives in your app) and a table (the matlab datatype that lets you manage heterogenous data).
In your app there appears to be a UITable object, this is the thing you dragged into your window in app designer. It has a name (in the sense of a name of a property on your app object) which is UITable, so to refer to your UITable you can use app.UITable.
Your UITable can contain some data, and that data could be a table or matrix. To refer to the data that lives in app.UITable, you can use app.UITable.Data
Your code snippet doesn't make much sense, it appears to be trying to keep assigning different things to the UITable object. Each of the first four lines is overwriting the line above it. The first line is assinging a variable (Matrix1) which hasn't been defined...

类别

Help CenterFile 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!

Translated by