How can I export selected brush data from a figure to the workspace of a function instead of saving it to the base workspace? (MATLAB R2020a)

5 vues (au cours des 30 derniers jours)
I have recently updated MATLAB version to (R2020a).
II had previously developed a function that I was using to plot some data, remove the unwanted points and save the wanted ones using the BRUSH tool and the CREATE VARIABLE (right-click) option. Doing this, the created variable was directly saved in the workspace of my function as I desired (and not in the base workspace).
With the latest update of MATLAB the available option from BRUSH tool in the figures is EXPORT BRUSHED (right-click). My problem is that EXPORT BRUSHED creates the new variable in the base workspace (indeed, the command prompt displays 'Variables have been created in the base workspace'), but I do not find the possibility to save this variable "inside" my function (in the workspace of my function, where I need my selected data).
Is there a way to have my EXPORT BRUSHED data in the workspace of my function, instead of in the base workskpace?
Thanks in advance.
Lydia Dux-Santoy
  2 commentaires
Mehmed Saad
Mehmed Saad le 20 Avr 2020
you can use evalin to get data from base workspace
Lydia Dux
Lydia Dux le 20 Avr 2020
Thanks Muhammad. I had never used evalin before, but now I will use it. Thanks for this really simple solution that makes my function operational again!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by