Generate MATLAB Code for Linearization from Linear Analysis Tool

This topic shows how to generate MATLAB® code for linearization from the Linear Analysis Tool. You can generate either a MATLAB script or a MATLAB function. Generated MATLAB scripts are useful when you want to programmatically reproduce a result you obtained interactively. A generated MATLAB function allows you to perform multiple linearizations with systematic variations in linearization parameters such as operating point (batch linearization).

To generate MATLAB code for linearization:

  1. In the Linear Analysis Tool, in the Linear Analysis tab, interactively configure the analysis I/Os, operating point, and other parameters for linearization.

  2. Click to expand the gallery.

  3. In the gallery, click the button for the type of code you want to generate:

    • Script — Generate a MATLAB script that uses your configured parameter values and operating point. Select this option when you want to repeat the same linearization at the MATLAB command line.

    • Function — Generate a MATLAB function that takes analysis I/Os and operating points as input arguments. Select this option when you want to perform multiple linearizations using different parameter values (batch linearization).

See Also

Related Examples

More About

Was this topic helpful?