Why does this problem occur?

I have a callback function in a gui in which i am loading a file with two fields. When i run only that(callback function) part of the code, the fields get loaded in the work space. But when i run the entire code, the work space does not show the fields to be loaded. I didn't get any error either.

3 Comments

Stephen23
Stephen23 on 7 Jul 2018
Edited: Stephen23 on 7 Jul 2018
"the fields get loaded in the work space"
Which workspace: the callback's own workspace, another workspace in the GUI, or some unrelated workspace? How are you checking this: are you using the debugging tools?
new user 00
new user 00 on 7 Jul 2018
Edited: new user 00 on 7 Jul 2018
thank you sooo much. I was struggling with this for a long time. You helped me solve it. Now my next problem is once the fields have been assigned to the base work space how can I use it in another callback function? I tried passing it as an argument and ended up getting "unknown variable error".
If you are using GUIDE then use guidata. If you are sensibly writing your own code then use nested functions.

Sign in to comment.

Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Asked:

on 7 Jul 2018

Commented:

on 7 Jul 2018

Community Treasure Hunt

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

Start Hunting!