How can I know the name of my table?

2 vues (au cours des 30 derniers jours)
Hugo Garnier
Hugo Garnier le 12 Nov 2021
Réponse apportée : Dave B le 12 Nov 2021
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,

Réponses (1)

Dave B
Dave B le 12 Nov 2021
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...

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by