Main Content


Class: io.reader
Namespace: io

Register custom workspace reader for the Simulation Data Inspector

Since R2020b




registerWorkspaceReader(obj) registers the custom workspace reader specified by obj for the Simulation Data Inspector. To use a custom workspace reader, you must register the reader at the start of each MATLAB® session.


To verify registration, use the io.reader.getRegisteredWorkspaceReaders method.

Input Arguments

expand all

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

Example: MyCustomReader


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.


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.

ans = 

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


Version History

Introduced in R2020b