How to avoid clearing workspace in MATLAB App button ?
Afficher commentaires plus anciens
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 commentaires
"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
le 23 Août 2021
Stephen23
le 23 Août 2021
"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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!