Retrieve application-defined data
Use this function to retrieve data stored using the
setappdata function. Both of these functions
provide a convenient way to share data between callbacks or between
Create a figure window.
f = figure;
Get the current date and time as separate variables.
dt = fix(clock); currdate = dt(1:3); currtime = dt(4:6);
Retrieve the date information.
ans = 2014 12 23
Retrieve all data associated with figure
ans = todaysdate: [2014 12 23] presenttime: [16 51 5]
obj— Graphics object containing the valuefigure | uipanel | uibuttongroup | uicontrol | ...
Graphics object containing the value, specified as any graphics
object (except an ActiveX® component). This is the same graphics
object passed to
setappdata during the storage
name— Name identifier
Name identifier, specified as a
This is the same name identifier passed to
the storage operation.
val— Stored valueany MATLAB® data type
Stored value, returned as the same value and data type that was originally stored.
All values stored in the graphics object with name identifiers, returned as a structure. Each field in the structure corresponds to a stored value. The field names of the structure correspond to the name identifiers assigned when each value was stored.