how to use a variable defined in a tab in the other tabs (Tab Group Appdesigner) ?
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Rahul
2025-3-18
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:
'Sharing Data Within App Designer Apps': https://www-test1.mathworks.com/help/releases/R2018a/matlab/creating_guis/share-data-across-callbacks-in-app-designer.html
Thanks.
0 个评论
另请参阅
类别
在 Help Center 和 File 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!