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:
In the Linear Analysis Tool, in the Linear Analysis tab, interactively configure the analysis I/Os, operating point, and other parameters for linearization.
Click to expand the gallery.
In the gallery, click the button for the type of code you want to generate:
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.
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).