getappdata
Gets the application data of an object.
Syntax
R = getappdata(handle)
R = getappdata(handle, dataname)
Inputs
- handle
- Handle of the object to retrieve application data from.
- dataname
- Name of the data to be retrieved.
Outputs
- R
- Value of the data. If dataname is omitted, getappdata will return all available application data for this object.
Examples
getappdata example:
f = figure;
setappdata(f, 'data1', 1);
getappdata(f, 'data1')
ans = 1
Get all application data of an object:
f = figure;
setappdata(f, 'data1', 1)
setappdata(f, 'data2', [1:10])
ans = struct [
data1: 1
data2: [Matrix] 1 x 10
1 2 3 4 5 6 7 8 9 10
]