Variables become undefined although they are saved in Workspace
Mostrar comentarios más antiguos
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
6 comentarios
Adam
el 13 de En. de 2016
It would help if you show some code. I never use assignin as it is generally a very bad idea and a situation I have never found any need for, but in theory it should do what you say, in practice it depends on your actual code.
Mus'ab Ahmad
el 13 de En. de 2016
Adam
el 13 de En. de 2016
You haven't attached anything yet so far as I can see.
Mus'ab Ahmad
el 13 de En. de 2016
Adam
el 13 de En. de 2016
You need to make sure you click 'Attach File' after clicking the paper clip and choosing your file. A lot of people (including myself sometimes) miss that and think it is attached just through choosing the file under the paperclip.
Mus'ab Ahmad
el 13 de En. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Workspace Variables and MAT Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!