1
\$\begingroup\$

I would like to make a rlocus plot with Octave. The problem is that the poles and zeros in the plot appear very small and rather hard to see by the naked eye. Is there a way to make these more visible? Specifying the size of Markers doesn't help. My MWE code is:

pkg load control
num=[0 0 0 1 3];
den=[1 5 20 16 0];
sys=tf(num,den)
pole(sys)'

rlocus(sys);

v=[-6 6 -6 6]; axis(v);axis('square');grid on;

The poles are at these locations:

-2.00000 - 3.46410i
-2.00000 + 3.46410i
-1.00000 - 0.00000i
 0.00000 - 0.00000i

And there is a zero at -3.0000. The plot from Octave is:

enter image description here

Octave adds a legend and shows a red dot for poles and a blue dot for zeros. These markers are so tiny that I have to zoom in at several magnitudes in order to see them. In the figure attached one will not be able to see these small markers at all.

\$\endgroup\$
1
  • \$\begingroup\$ How about adding a picture showing the too-small-to-properly-see artefacts? \$\endgroup\$
    – Andy aka
    May 7 '18 at 10:00
1
\$\begingroup\$

Edit the rlocus.m file, in \share\octave\packages\control-3.1.0\rlocus.m

Change lines 291 to 294 from:

set (hplt(kk--), "markersize", 2);
if (! isempty (rlzer))
  set (hplt(kk--), "markersize", 2);
endif

to:

set (hplt(kk--), "markersize", 10);
if (! isempty (rlzer))
  set (hplt(kk--), "markersize", 10);
endif

Result:

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ @VincenteCunha Excellent! Are there any good tutorials on Octave for the control package? The web shows little resources. \$\endgroup\$
    – user11206
    May 8 '18 at 4:56
  • \$\begingroup\$ Sorry, I could not say. I'm more of a matlab guy, never really used octave. \$\endgroup\$ May 8 '18 at 5:22
  • \$\begingroup\$ A few Matlab functions sadly do not have their equivalence in Octave and as far as I can see there is no proper resources of documents showing Octave being applied to control problems. \$\endgroup\$
    – user11206
    May 8 '18 at 5:54
0
\$\begingroup\$

I know nothing about octave but perhaps this solution I just found will work.

Function File: axis ([x_lo x_hi y_lo y {_hi z_lo z_hi}])
(z is optional)

https://octave.org/doc/v4.0.1/Axis-Configuration.html

\$\endgroup\$
1
  • \$\begingroup\$ My question is more for the locations of poles and zeros that Octave draws very small on the plot. Thanks anyway. \$\endgroup\$
    – user11206
    May 6 '18 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.