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 (최근 30일)
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
Lydia Dux
Lydia Dux 2020년 4월 20일
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!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by