what is the function of guidata
1 view (last 30 days)
Show older comments
I tried to refer to the status of a button in GUI in an outside function. So I used the guidata (as well as findobj) to get the handle of the button. The unexpected consequence is that it also refresh a DAQ board on the PCI bus. This will turn off my other equipments connected to DAQ.
Does anyone know how I can avoid this problem, or to use other function instead?
Edited: Julien on 8 Oct 2012
guidata is a function to store and retrieve datas inside GUI's. It's a method to share datas between gui's component. But personnaly I don't use this function. If I use GUIDE, I prefer storing datas inside handles structure, which is always shared between components. if you want to separate handles from datas (for example to save or load datas from a mat file), then you can imagine to insert a data structure inside the handle structure (kind of handles.dat.mydata)
If you use findobj, you have to care about what property you are searching. Maybe other components you don't want to modify share the same properties.
to be sure, display inside command windows what findobj returns
yes you're right ;) I forgot to mention it (I don't do that in guide generally, I prefer doing it programmatically)
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!