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

2 views (last 30 days)
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

Answers (1)

Rahul
Rahul on 18 Mar 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.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!