Main Content

Import Signal Data for Root Inport Mapping

Import Signal Data

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 data.

Note

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:

  1. Open the Root Inport Mapper tool. For the model, click Model Settings. In the Configuration Parameters > Data Import/Export pane, click Connect Inputs.

  2. 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.

      Note

      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, MAT-file, or base workspace.

  3. 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.

Import Bus Data

Use bus objects for bus data that you want to import and map to root inports or bus element ports.

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.

Import Signal Data from Other Sources

Use the Root Inport Mapper tool to import signals from other sources.

Import Data from Signal Editor

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.

Import Test Vectors from Simulink Design Verifier Environment

You can import and map Simulink Design Verifier test vectors. This workflow requires a Simulink Design Verifier license.

Before importing, use the Simulink Design Verifier sldvsimdata (Simulink Design Verifier) function to convert a Simulink Design Verifier test structure to a Simulink.SimulationData.Dataset object. This file contains a test vector structure sldvData. Save the output to a MAT-file and then import that file into the Root Inport Mapper tool.

See Also

Blocks

Tools

Related Topics