Store application-defined data
Use this function to store data in a UI. You can retrieve
the data elsewhere in your code using the
Both of these functions provide a convenient way to share data between
callbacks or between separate UIs.
Create a figure window. Then, get the current time using
f = figure; val = date
val = 23-Dec-2014
Store the contents of
val using the
In this case,
val is stored in the figure object
using the name identifier,
Retrieve the data and display it.
ans = 23-Dec-2014
obj— Graphics object in which to store the valuefigure | uipanel | uibuttongroup | uicontrol | ...
Graphics object in which to store the value, specified as any graphics object (except an ActiveX® component). The graphics object must be accessible from within the functions you plan to store and retrieve the data.
name— Name identifier
Name identifier, specified as a
Select a unique name identifier that is easy to remember so that you
can easily recall it when you want to retrieve the data.
val— Value to storeany MATLAB® data type
Value to store, specified as any MATLAB data type.