Export to MATLAB®

When you export models to MATLAB®, an M file is generated for each output. Depending on the export type, other files are also generated. For more information about these files, see Model Export to MATLAB®.

Export a model to MATLAB®

  • File > Export Model > Matlab.

    ClosedExport to Matlab window

  • Set the Base Name (defines the file names <base name>_<output>) and the Target Folder.

  • Select the Type of data you want to export. For more information on the export types see Model Export to MATLAB®.

    1. Select the Inputs and Outputs to export in the table. The order in which the inputs are passed to the exported model can be changed using the and buttons.

      You can use the standard Ctrl/Shift selection functions in the table, or click and hold Lmb and drag the cursor over the cells/rows you want to select. The position of the inputs in the exported model is shown in the # column.

      To export only used inputs, select Used Inputs Only.

  • Click Export.

  • The export starts and the files are saved to the specified path. A link to the export folder is displayed in the log window.