How to avoid clearing workspace in MATLAB App button ?
Mostrar comentarios más antiguos
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 comentarios
"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
el 23 de Ag. de 2021
Stephen23
el 23 de Ag. de 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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!