Stuart’s MATLAB Videos

Watch and Learn

Passing data between GUIDE callbacks without globals in MATLAB

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.

  • print


댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.