MATLAB: Variables become undefined although they are saved in Workspace

undefined variablexml

I read XML file using GUI pushbutton, extract some data, and do some manipulations for them. The thing is although I save the required variables to workspace (using assignin), I can't use them outside the pushbutton callback function for further manipulation because matlab tells me 'undefined variables'! any suggestions? Thanks

Best Answer

Did you also define the workspace location?
e.g.
assignin('base','your_variable_name',your_variable_value);
Related Question