Mu Analysis and Synthesis Toolbox    
vplot

Plot multiple VARYING matrices on the same graph

Syntax

Description
The vplot command calls the standard MATLAB plot command for plotting. The optional plot_type argument specifies the type of graph, and selects between the various logarithmic or linear graph types. The plot_type specification choices are

iv,d
matrix (decimal) vs. independent variable
iv,m
magnitude vs. independent variable
iv,lm
log(magnitude) vs. independent variable
iv,p
phase vs. independent variable
liv,d
matrix vs. log(independent variable)
liv,m
magnitude vs. log(independent variable)
liv,lm
log(magnitude) vs. log(independent variable)
liv,p
phase vs. log(independent variable)
ri
real vs. imaginary (parametrized by independent variable)
nyq
real vs. imaginary (parametrized by independent variable)
nic
Nichols chart
bode
Bode magnitude and phase plots
bode_g
Bode magnitude and phase plots with grids
bode_l
Bode magnitude and phase plots with axis limits
bode_gl
Bode magnitude and phase plots with grids and axis limits

If no plot_type specification is given the default is 'iv,d'.

The bode_l and bode_gl plot_type specifications require that the second and third arguments are the desired axis limits for the top and bottom plots. These are simply the 1x 4 vectors to be used as arguments for the axis command.

The remaining arguments of vplot take the same form as the MATLAB plot command. Line types (for example,'+', 'g-.', or '*r') can be optionally specified after any VARYING matrix argument.

There is a subtle distinction between CONSTANT and VARYING matrices with only one independent variable. A CONSTANT is treated as such across all independent variables, and consequently shows up as a line on any graph with the independent variable as an axis. A VARYING matrix with only one independent variable will always show up as a point. You may need to specify one of the more obvious point types in order to see it (e.g., '+', 'x', etc.).

Examples
Two SISO second-order systems are created, and their frequency responses are calculated for each over different frequency ranges.

A VARYING matrix with a single independent variable is also created. Note the distinction between this and the CONSTANT matrix in the subsequent plots.

The following plot uses the 'liv,lm' plot_type specification. Note that the CONSTANT matrix is seen over all values of the independent variable. This is only true because it is displayed as a line type. If it were displayed as a point, then one would see points only on each of the side axes. The single valued VARYING matrix (rspot) is shown only at the appropriate independent variable value.

You can customize vplot to select the type of axis uses for log magnitude and phase plots. The default is to plot the log magnitude on a base 10 scale and plot phase in radians. It is a simple modification to select a dB scale and phase in degrees. Documentation of the modification is provided in the M-file vplot. You can copy the command vplot to a private directory (for example, matlab/toolboxes/mu_cmds on UNIX systems) and make the appropriate modifications.

Several control design plot functions are also provided. These are bode, nic, and nyq, for Bode, Nichols, and Nyquist, respectively. The following three plots demonstrate each of these commands.

The log magnitude and phase axes are labeled automatically. You can change these labels. Documentation for doing this is in the Help facility for vplot.

The default axis scale selection for the Nichols plot is dB versus phase in degrees. This corresponds to the usual choice for this plot and can be different from the axis scale selection for bode, liv, lm, liv, p, etc. Again you can change this if required.

See Also
plot



vpck, vunpck, var2con vpoly, vroots