Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plot circle in Matlab?

145 views
Skip to first unread message

Gary Levenson

unread,
Jan 3, 1997, 3:00:00 AM1/3/97
to

In article <5aiima$s...@ccnews.ncku.edu.tw>,
n968...@sparc19.cc.ncku.edu.tw says...
>
> Hi,netter:
>
> I want to plot the pole-zero diagram of a discrete transfer function.
> But I found no command to support it.Then I tried to write such a function.
> Does anyone know any plotting circle command or line in Matlab?
>

Plotting sin(x) vs cos(x) will give you a circle.

From the Signal Processing Toolbox:

>>help zplane

ZPLANE Z-plane zero-pole plot.
ZPLANE(Z,P) plots the zeros Z and poles P (in column vectors) with
the
unit circle for reference. Each zero is represented with a 'o' and
each pole with a 'x' on the plot. Multiple zeros and poles are
indicated by the multiplicity number shown to the upper right of the
zero or pole. ZPLANE(Z,P) where Z and/or P is a matrix plots the
zeros
or poles in different columns with different colors.

If either argument is a row, ZPLANE finds the roots of the argument
with ROOTS. So, ZPLANE(B,A) where B and A are row vectors containing
transfer function polynomial coefficients plots the poles and zeros
of B(z)/A(z). ZPLANE assumes scalars are zeros or poles.

[H1,H2,H3]=ZPLANE(Z,P) returns vectors of handles to the lines and
text objects generated. H1 is a vector of handles to the zeros
lines,
H2 is a vector of handles to the poles lines, and H3 is a vector of
handles to the axes / unit circle line and to text objects which are
present when there are multiple zeros or poles. In case there are no
zeros or no poles, H1 or H2 is set to the empty matrix [].

ZPLANE(Z,P,AX) puts the plot into axes AX.

See also FREQZ.

From the Control System Toolbox:

>>help pzmap

PZMAP Plot pole-zero map of continuous-time linear system.
PZMAP(A,B,C,D) computes the eigenvalues and transmission zeros of
the continuous-time state-space system (A,B,C,D) and plots them
in
the complex s-plane. The poles are plotted as x's and the zeros
are plotted as o's.

PZMAP(NUM,DEN) computes the poles and zeros of the SISO
polynomial
transfer function G(s) = NUM(s)/DEN(s) where NUM and DEN contain
the polynomial coefficients in descending powers of s. If the
system has more than one output, then the transmission zeros are
computed.

PZMAP(P,Z) plots the poles, P, and the zeros, Z, in the complex
plane. P and Z must be column vectors. When invoked with left
hand arguments,
[P,Z] = PZMAP(NUM,DEN) or [P,Z] = PZMAP(A,B,C,D)
returns the poles and transmission zeros of the system in the
column vectors P and Z. No plot is drawn on the screen.

The function SGRID or ZGRID can be used to plot lines of constant
damping ratio and natural frequency in the s or z plane.

See also: RLOCUS,SGRID,ZGRID,EIG,TZERO,SS2ZP, and TF2ZP.


From the System ID Toolbox:

ZPPLOT Plots zeros and poles.
ZPPLOT(ZEPO) or ZPPLOT(ZEPO,SD) or ZPPLOT(ZEPO,MODE)
or ZPPLOT(ZEPO,SD,MODE,AXIS)

The zeros and poles, specified by ZEPO (See TH2ZP, or ZPFORM
for the format) are plotted, with 'o' denoting zeros and 'x'
poles.
Poles and zeros associated with the same input, but different
models
are always plotted in the same diagram, and 'ENTER' advances the
plot
from one model to the next (if any).

When ZEPO contains information about several different inputs
there
are some options:
MODE='sub' (The default value) splits the screen into several
plots.
MODE='same' gives all plots in the same diagram. Use 'ENTER' to
advance
MODE='sep' erases the previous plot before the next input is
treated.
AXIS=[x1 x2 y1 y2] fixes the axes scaling.
AXIS=m is the same as AXIS=[-m m -m m]. Default is autoscaling
If SD>0, confidence regions around the poles and zeros are
plotted.
The region corresponding to SD standard deviations is marked.
SD=0 is default.
For multi-output models, each output is handled separately.
See also TH2ZP, ZP, and ZPFORM.


HTH,

-Gary

0 new messages