Passing Data Between GUIDE Callbacks Without Globals in MATLAB
(Originally posted on Doug's MATLAB Video Tutorials blog.)
Very often MATLAB users want to share data between different callbacks that they have in their MATLAB GUIs. This video shows a technique that is applicable for when the data being shared is already stored in the state of the GUI. Examples of data that is stored in the state of the GUI includes the state (checked or unchecked) of a checkbox or the string that is held in an edit box. This programming pattern is also good for having a variety of UIcontrols update the GUI in the same way.
If you are looking to share data between callbacks that is not stored in the state of the GUI, then this very old video should help. It shows you how to use GETAPPDATA and SETAPPDATA to share data in a MATLAB GUI.
Recorded: 23 Nov 2011
Featured Product
MATLAB
Up Next:
Related Videos:
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)