If I might impose one more time, I'd like the plot to show the imaginary
axis. With no kmax, it shows a vertical line for the imaginary axis at
the -70 on the real axis. Is there a way to get it to draw an axis at 0 on
the real axis? Thanks again.
M. Nimmo <ni...@nord-com.net> wrote in message
news:3AB06DB4...@nord-com.net...
> "M. Nimmo" wrote:
> >
> > Robert Bursey wrote:
> > >
> > > I am trying to do a root locus plot in Scilab. Since I've never done
this
> > > before, I thought I'd try a plot of
> > >
> > > s+7
> > > ------------------------------
> > > s(s+5)(s+15)(s+20)
> > >
> > > for which I know the shape from Matlab. Unfortunately, I get a
different
> > > shape when I try it Scilab, using syslin and the Evans function but
I'm not
> > > sure I'm doing it right. These functions are both new to me. Can
anybody
> > > help me out with how to do root locus in Scilab? Thanks.
> >
> > The way to do it is to define "s"
> > s=poly(0,'s');
> > then to define you transfer function (e.g. sl):
> > num=s+7;
> > den=s*(s+5)*(s+15)*(s+20);
> > sl=syslin('c',num,den);
> > and then call the root locus function
> > evans(sl);
> > If it looks different to your matlab plot that is probably because
> > the
> > maximum gain kmax is differs (or matlab is wrong ;-) ).
>
> Type
> help evans
> for more information on the function including kmax.
>
> Matthew
Matthew.
The location of the imaginary axis is admittedly one of the main things
you want to see in a root locus plot.
Since there are no other options with the evans function regarding the
looks of the plot you could programm your own function i.e. redefine the
evans function as you find it in
/usr/lib/scilab/macros/xdess/evans.sci
(or wherever you've got scilab). You would want to play around with the
plot2d commands (e.g. don't plot a frame, draw axes as (x,y)-plots; cf.
the help page for plot2d for how to do that). After redefining the
function you "getf" the new function.
All that might be too complicated for your purposes. A more primitive
way of seeing where the imaginary axis is is to plot a line from
[0,ymin] to [0,ymax] into the root locus plot where ymin and ymax are
the lower and upper limits of the imaginary axis. In your case (ymin=-50
and ymax=50) it would be
plot2d([0;0],[-50;50],1,'000')
That's all I can think of at this point.
Matthew.
plot2d([0;0],[-50;50],5,'000')