why some variables on my gui program doesn't go to workspace
16 views (last 30 days)
Show older comments
i made this GUI and it has some calculation and variables in it but these variables never go to workspace why? i tried the same algorithme on a seperate script and it works perfectly with variables stored in the workspace but it doesnt work in my gui
1 Comment
Stephen23
on 9 Nov 2017
"...but these variables never go to workspace why?"
They do. They are defined in the function workspace, and do not just magically appear in the base workspace. Which is exactly how it be: every function has its own independent workspace:
If you want to pass data between workspaces then use the methods shown in the MATLAB documentation:
I would recommend that you use nested functions or guidata.
Answers (0)
See Also
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!