getappdata
Retrieve application-defined data from an object.
📝Syntax
value = getappdata(h, name)
s = getappdata(h)
📥Input Arguments
Parameter Description
h a graphics object.
name a string: the data name.
📤Output Arguments
Parameter Description
value the stored value, or [] if the name is not set.
s a structure of all application data when no name is given.
📄Description

getappdata returns the application-defined data named name stored on h, or all of it as a structure when name is omitted.

💡Examples
f = figure();
setappdata(gca, 'state', 42);
getappdata(gca, 'state')
🔗See Also
setappdataisappdatarmappdata
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub