Before you can import data, identify the signals that you want to import and set up the data to use with root-level inport mapping. See Create Signal Data for Root Inport Mapping. For a summary of the other steps involved in using the Root Inport Mapper tool, see Import and Mapping Workflow.
For data import purposes, the Root Inport Mapper From MAT-File and From Workspace dialog boxes
provide a Convert signals into a scenario dataset and save to
MAT-file check box, selected by default. To convert the data in your
MAT-file to a
Simulink.SimulationData.Dataset object, select this
check box. Alternatively, use the
convertToSlDataset function to convert your
The Root Inport Mapper tool uses the term link to refer to the act of importing Simulink® data. The sources from which you can link your data are in the LINK section of the tool.
To import signal data for root-inport mapping:
Open the Root Inport Mapper tool. In the Configuration Parameters > Data Import/Export pane, click Connect Input.
In the LINK section, select the data source.
To browse to the MAT-file or spreadsheet file that contains the signals you want to import, select From Spreadsheet or From MAT-File and browse to the MAT-file or spreadsheet file. To return to the LINK section, click OK.
To import bus data for root inport mapping, see Import Bus Data.
To display a list of base workspace variables that you can import, select From Workspace. Select the variables that you want to import and click OK.
The From dialog box displays the contents of the spreadsheet, file, or base workspace.
Select the data that you want to import, and then click OK.
The Root Inport Mapper tool displays the imported data.
Alternatively, you can create signal data to map using the Signals > New MAT-File option. For more information, see Create and Edit Signal Data.
Use bus objects for bus data that you want to import and map to root inports.
Store the bus objects in a MAT-file. Use a different MAT-file that contains the bus data that
you want to import for the bus object. This file can be an existing MAT-file that
already contains a MATLAB®
struct. You can also create the bus in the base workspace and save it
to a MAT-file. For more information, Bus Signal Data for Root Inport Mapping.
To import the bus data, in the LINK section of the Root Inport Mapper toolstrip, click From MAT-File. Select the MAT-file that contains the bus data and click OK.
Use the Root Inport Mapper tool to import signals from other sources.
You can import Excel® spreadsheet data. The Root
Inport Mapper tool imports a worksheet as a
that contains timeseries elements.
To import test vectors from Simulink Design Verifier™, see Import Test Vectors from Simulink Design Verifier Environment.
You can import and map data from the Signal Editor block in a MAT-file. For more information, see Load Data with Interchangeable Scenarios Using Signal Editor Block.
You can import and map Simulink Design Verifier test vectors. This workflow requires a Simulink Design Verifier license.
Before importing, use the Simulink
convert a Simulink
Design Verifier test structure to a
object. This file contains a test vector structure
the output to a MAT-file and then import that file into the Root Inport Mapper