Azzera filtri
Azzera filtri

Change pzplot marker size

51 visualizzazioni (ultimi 30 giorni)
RuiQi
RuiQi il 1 Apr 2016
Risposto: Stephen Wilkerson il 12 Giu 2023
Hello,
How do i change the marker size for the pzplot ?

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 1 Apr 2016
h=tf(1,[1 1 5])
pzplot(h)
findobj(gca,'type','line')
set(a(2),'markersize',7)
set(a(3),'markersize',7)
  3 Commenti
David Willis
David Willis il 18 Mag 2017
In Version 2013a I had to make a small modification to the code above. I also added a line to show how to change the marker linewidth.
a = findobj returns an array of double. In the case below, a(3) points to all the pole markers, a(2) to the zero markers. The for loop is a lazy man way of getting them all.
h=tf([1 2],[1 1 5])
pzplot(h)
a = findobj(gca,'type','line')
for i = 1:length(a)
set(a(i),'markersize',12) %change marker size
set(a(i), 'linewidth',2) %change linewidth
end
Kamilu Sanusi
Kamilu Sanusi il 2 Mag 2023
@Azzi Abdelmalek, if i am plotting eigen values of more than one matrix, and I want to change the pole and zero of markers for each matrix on the same pz plot, please how do i make changes? I am more of concern with the thickness (boldness) of the marker than the size
if D == 15
pzmap(T,'r')
end
hold on
if D == 25
pzmap(T,'m')
end
Thank you

Accedi per commentare.

Più risposte (1)

Stephen Wilkerson
Stephen Wilkerson il 12 Giu 2023
% Let's change the symbol size
% Why Mathworks makes the symbols unseeable is beyond me
% Why mathworks makes this harder then it should be is beyond me
% Here is a solution that works, unlike the above!
sys1 = tf(4,[1 0 4]);
h = pzplot(sys1)
grid on
a = findobj(gca,'type','line');
for i = 1:length(a)
set(a(i),'markersize',20); %change marker size
set(a(i), 'linewidth',2); %change linewidth
set(a(i),'Color','r')
end

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by