Main Content

rmappdata

Remove application data

    Description

    example

    rmappdata(obj,name) removes the application data, identified by name, from its association with the UI component obj.

    Examples

    collapse all

    Create a figure window. Then, get the current time by using the date function. Store val in the figure object with name identifier 'todaysdate'.

    f = figure;
    val = date;
    setappdata(f,'todaysdate',val)

    Confirm that the data is stored.

    isappdata(f,'todaysdate')
    ans = logical
       1
    
    

    Remove the stored data. Identify the data to remove by its associated figure and name identifier.

    rmappdata(f,'todaysdate')

    Confirm that the data is no longer stored in the figure.

    isappdata(f,'todaysdate')
    ans = logical
       0
    
    

    Input Arguments

    collapse all

    Graphics object storing the data, specified as any graphics object. This object is the same graphics object passed to setappdata during the storage operation.

    Name identifier of the data, specified as a character vector or string scalar. This identifier is the same name identifier passed to setappdata during the storage operation.

    Introduced before R2006a