From: Daniel on 27 Jul 2010 03:48 Hi! I have done a GUI with some buttons. For each button I get a function like function testButton_Callback(hObject, eventdata, handles) (which is used for reading data from an instrument using GPIB). None of the data in this function is available in the workspace. It would be really nice to have it there to do some post processing on the data. Any suggestions on how to do that?
From: Steven_Lord on 27 Jul 2010 09:59 "Daniel " <daniel.gillen(a)ericsson.se> wrote in message news:i2m2vj$ia7$1(a)fred.mathworks.com... > Hi! > > I have done a GUI with some buttons. For each button I get a function like > function testButton_Callback(hObject, eventdata, handles) > > (which is used for reading data from an instrument using GPIB). None of > the data in this function is available in the workspace. That is correct; any data you may read in this callback function resides in the workspace of this function, not the base workspace. > It would be really nice to have it there to do some post processing on the > data. Any suggestions on how to do that? You might want to watch Doug's video about returning output from a GUI. http://blogs.mathworks.com/videos/2010/02/12/advanced-getting-an-output-from-a-guide-gui/ and review this section from the documentation: http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f10-998580.html#f10-999738 That will require sharing the data from this callback with the OutputFcn. http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f5-998197.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: Dynamic quantile regression Next: Earn money$$$ just minuts its really true.. |