Main Content

Generate MATLAB Code for Linearization from Model Linearizer

This topic shows how to generate MATLAB® code for linearization from the Model Linearizer. You can generate either a MATLAB script or a MATLAB function. To programmatically reproduce a linearization result that you obtained interactively, you can use a generated MATLAB script. To perform multiple linearizations with systematic variations in your linearization configuration, you can use a generated MATLAB function.

To generate MATLAB code for linearization:

  1. In the Model Linearizer, on the Linear Analysis tab, interactively configure the analysis points, operating points, and parameter variations for linearization.

  2. In the Linearize section, expand the gallery by clicking .

  3. In the gallery, depending on the type of code you want to create, click:

    The software creates a MATLAB file that contains the generated code and opens the file in the MATLAB Editor.

  4. In the MATLAB Editor, you can edit and save the file.

See Also

Functions

Apps

Related Topics