MATLAB Answers

save variables from GUI to workspace (variables not accesible )

99 views (last 30 days)
maximilian comploj
maximilian comploj on 7 Feb 2015
Commented: Arshavin Hasegava on 17 Jul 2020
hello I created a GUI with GUIDE and values are entered by the GUI Variables are then saved seperately in a text file all perfect. BUT I cannot acces to the variables in the WORKSPACE.
I would like to make my variables visible and so that i can acces to them for further projects.
Can someone HELP please thank u a lot.

Answers (1)

Jason Moore
Jason Moore on 7 Feb 2015
Which ever variables you would like to be in the workspace simply save them off to the base workspace by doing
myVar = 5
in this case assignin takes three arguments. First, the workspace to save the variable. Second, the name of the variable. Lastly, the value of the variable.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!