How to avoid clearing workspace in MATLAB App button ?
显示 更早的评论
Hi,
I have existing variables in matlab worksace.
I am creating on app in which there is Button. If I click button then all workspace variables get erased .
How to avoid erasing of these workpace variables ?
The app works on the worksspace data.
3 个评论
"The app works on the worksspace data."
Which workspace?
An app should operate on data in the app's workspace:
https://www.mathworks.com/help/matlab/creating_guis/share-data-across-callbacks-in-app-designer.html
Trying to magically manipulate data in other workspaces (e.g. the base workspace) is not a good approach.
Kaustubh hike
2021-8-23
Stephen23
2021-8-23
"I want it should work on matlab workspace."
Every workspace in MATLAB is a MATLAB workspace.
Did you read the links that I gave you? They explain the basics about different MATLAB workspaces.
The best solution by far is to pass the data to your app and process it within the app workspaces. Is there any particular reason why you cannot use the best approach, but instead need to use a slow, complex, buggy approach to accessing your data?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 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!