Main Content

unregisterWorkspaceReader

Class: io.reader
Package: io

Unregister custom workspace reader for the Simulation Data Inspector

Syntax

unregisterWorkspaceReader(obj)

Description

unregisterWorkspaceReader(obj) unregisters the custom workspace reader specified by obj from the Simulation Data Inspector. All custom file and workspace variable readers are unregistered when you close MATLAB®.

Input Arguments

expand all

Custom data reader, specified as an object of a class that inherits from the io.reader base class.

Example: MyCustomReader

Examples

expand all

This example shows how to register a custom workspace data reader with the Simulation Data Inspector, verify registration was successful, and unregister the workspace reader.

This example registers a custom workspace data reader called SimpleStructReader. For an example that shows how to author the custom workspace reader, see Import Workspace Variables Using a Custom Data Reader.

registerWorkspaceReader(SimpleStructReader);

To verify registration of a custom workspace reader, use the io.reader.getRegisteredWorkspaceReaders method, which returns a string array that contains the names of all registered custom workspace readers.

io.reader.getRegisteredWorkspaceReaders
ans = 
"SimpleStructReader"

To unregister a custom workspace reader, use the unregisterWorkspaceReader method. All readers are unregistered when you close the MATLAB™ session.

unregisterWorkspaceReader(SimpleStructReader);
Introduced in R2020b