how to use a variable defined in a tab in the other tabs (Tab Group Appdesigner) ?

1 visualización (últimos 30 días)
when i define a variable in any tab , i can't recall it on other tabs
for example ;
in the 1st tab
T = 15 ;
in the 2nd tab
L= T + 5
result is undefined function

Respuestas (1)

Rahul
Rahul el 18 de Mzo. de 2025
As per my understanding in MATLAB App Designer if you are trying to set a variable that you wish to be availble throughout the app then you will have to set it as a property within the app. Currently, you are only defining it within a callback function and hence the variable is not available globally within the app.
Within the App Designer app whenever you set any property or component it is availeble throughout the app globally. Hence, this issue is not related to Tab Group.
You can set a property by clicking the + icon inside 'Code Browser' inside 'Code View' of the app. Once this property is set, it can be accessed and changed throughout the app by using callbacks or functions.
the following MATLAB Answer can be useful:
The following MathWorks documentations can be referred to know more:
Thanks.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by