Change pzplot marker size

58 visualizaciones (últimos 30 días)
RuiQi
RuiQi el 1 de Abr. de 2016
Respondida: Stephen Wilkerson el 12 de Jun. de 2023
Hello,
How do i change the marker size for the pzplot ?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 1 de Abr. de 2016
h=tf(1,[1 1 5])
pzplot(h)
findobj(gca,'type','line')
set(a(2),'markersize',7)
set(a(3),'markersize',7)
  3 comentarios
David Willis
David Willis el 18 de Mayo de 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 el 2 de Mayo de 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

Iniciar sesión para comentar.

Más respuestas (1)

Stephen Wilkerson
Stephen Wilkerson el 12 de Jun. de 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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by