From: Adam on
Hi,

I'm creating a somewhat complex GUI and will need to pass data to and from functions clearly and easily. Because of the complexity of the project, I would like to use GUIDE to make the GUI programming simpler.

The issue I'm having is with GUIDE's generated .m file. In the auto generated format, functions don't seem to have an end command. The automatic generated function is open and callbacks also don't end. If I properly end functions, the code doesn't run.

I would like to define variables that can be accessed within callbacks. For example, one button asks the user to choose a file, while another uses the filename to read the file and uses data from within it. Unfortunately, because the functions don't end, I can't use global variables. I also can't use the handle of the button, since no data is actually stored in a button object. I would like to do the same thing with a menu item which asks the user to import a file. Is there a simple way to pass data from within these endless functions? Is there a better way to do this?

Thanks a lot.
Adam
 | 
Pages: 1
Prev: isocline surfaces - 3D
Next: Curve / data fit