This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Plot Function Syntax

The PlotFcn option specifies one or more functions that an optimization function calls at each iteration to plot various measures of progress while the algorithm executes. The structure of a plot function is the same as that for an output function. For more information on writing and calling a plot function, see Output Function Syntax. For an example of using built-in plot functions, Using a Plot Function.

To view a predefined plot function listed for PlotFcn, open the function in the MATLAB® Editor. For example, to view the file corresponding to the norm of residuals, enter:

edit optimplotresnorm.m
You can use any predefined plot function as a template for writing a custom plot function.

Related Topics