Sharing Variables between app and matlab workspace?

Hey community,
I have developed an app with the app designer, I am wondering if there's any way to preview and manipulate the variables generated by the app in matlab's main space.
Thanks in advance

4 comentarios

Rik
Rik el 15 de Ag. de 2022
Is it the intention that the app is still open and can be used to generate new outputs? Or is it a more linear workflow?
Farid
Farid el 16 de Ag. de 2022
Let's say I have a button in my app that generates an array called "app.signal" and I want to analyse it with Matlab's signal processing app. it can't be done unless the array is available in the workspace. wanted to know if it is possible to have the variable in the workspace directly. thanks
My debugging work-around for situations like that is commonly to global a name at the command line, and assign the desired value to the name. Doing so effectively inserts the name into the visible workspace even if it was a "static" workspace (a function that had an "end" matching its "function" line, which is a situation where you cannot just assign to workspace variables in the debugger.)
Farid
Farid el 17 de Ag. de 2022
Thank you Walter.

Iniciar sesión para comentar.

 Respuesta aceptada

Put this statement after you generate your data in the callback
mydata = ...
assignin('base', 'mydata')

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 15 de Ag. de 2022

Comentada:

el 17 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by