0
\$\begingroup\$

This question is linked to this one:

Octave rlocus: format ploles and zero

I am using the Octave command pzmap but the size of the markers of the poles and zeros by default are very hard to see on the computer screen. I have looked at the pzmap.m file and changed the line:

h = plot (pol_args{:}, zer_args{:});

to

h = plot (pol_args{:}, zer_args{:},"markersize", 20);

but there is no effect.

and putting the markersize parameter in an actual code is not valid:

num=[1 3];
den=[1 5 20 16 0];
sys=tf(num,den);
pzmap(sys,"markersize", 20) %not valid

Any suggestion?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

The line you edited in pzmap.m is almost correct. You need to provide a "markersize" option for both poles and zeros.

Original plot:

enter image description here

After changing line 116 of \share\octave\packages\control-3.1.0\pzmap.m

h = plot (pol_args{:}, "markersize", 10, zer_args{:}, "markersize", 10);

enter image description here

Edit: to modify linewidth:

h = plot (pol_args{:}, "markersize", 10, "linewidth", 5, zer_args{:}, "markersize", 10, "linewidth", 5);

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Great. Is there a way to make the markers appear bold i.e. by changing the line weight? \$\endgroup\$
    – user11206
    May 14, 2018 at 8:33
  • 1
    \$\begingroup\$ @user11206 Appended it to answer. Check the edit. \$\endgroup\$ May 14, 2018 at 19:30
  • \$\begingroup\$ Great! It works fine in Octave. \$\endgroup\$
    – user11206
    May 15, 2018 at 5:19
1
\$\begingroup\$

Try the following code,

num=[1 3];
den=[1 5 20 16 0];
sys=tf(num,den);
pzmap(sys) h=pzmap(sys)

hh = findobj(gca,'type','line');
for jj=2:length(hh)
set(hh(jj),'MarkerSize',12,'MarkerEdgeColor','red','LineWidth',5);
end

source

And the result is,

enter image description here

\$\endgroup\$
8
  • \$\begingroup\$ Great. Is it possible to make the markers more pronounced as in "bold". \$\endgroup\$
    – user11206
    May 10, 2018 at 9:44
  • \$\begingroup\$ With the command: set(h.allaxes.Children(1).Children, 'MarkerSize', 20), I am getting the error message: error: matrix cannot be indexed with . \$\endgroup\$
    – user11206
    May 10, 2018 at 9:48
  • \$\begingroup\$ @user11206 check the edited answer \$\endgroup\$
    – Hazem
    May 10, 2018 at 9:53
  • \$\begingroup\$ pzplot is not yet part of Octave. Are you testing the code in Matlab or Octave? \$\endgroup\$
    – user11206
    May 10, 2018 at 14:18
  • 1
    \$\begingroup\$ Done. Thank you for the suggestion. stackoverflow.com/questions/50285757/… \$\endgroup\$
    – user11206
    May 11, 2018 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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