labelling x and y axis in pole zero map with latex

3 vues (au cours des 30 derniers jours)
Ajira
Ajira le 5 Août 2019
Modifié(e) : Adam Danz le 6 Août 2019
I need to edit x and y axis in pole zero map command in matlab, but I think just because the units are difined in this command, I can't edit them in latex.
I write this command but it doesn't change :
clear all
clc
syms l1 l2 c s gd g1 g2 g3 g4 g5 h1 ts xi x il1 vrc vp ig vin vrcn r1
%%
l1=500e-6;
l2=250e-6;
c=100e-6;
wr=sqrt((l1+l2)/(l1*l2*c));
xi=0;
%%
Glcl_d=(1/(s*l1*l2*c)*(1/(s^2+2*xi*wr*s+wr^2)));
[symNum,symDen] = numden(Glcl_d); %Get num and den of Symbolic TF
TFnum = sym2poly(symNum); %Convert Symbolic num to polynomial
TFden = sym2poly(symDen); %Convert Symbolic den to polynomial
an =tf(TFnum,TFden);
pzplot(an,'r')
sgrid
title('Pole-Zero Map','Interpreter','latex');
xlabel('\%Real Axis,\textit{$1/sec$} ','defaultTextInterpreter','latex');
ylabel('Imaginary Axis','Interpreter','latex');
but every time I get this figure : how can I edit x and y axis ??
thx

Réponse acceptée

Adam Danz
Adam Danz le 5 Août 2019
Modifié(e) : Adam Danz le 6 Août 2019
The handles are deeply buried and undocumented....
h = pzplot(an,'r')
xlabel('\%Real Axis, ')
h.AxesGrid.XUnits = '\textit{$1/sec$} ';
ylabel('Imaginary Axis') % Really no need for this line
h.AxesGrid.YUnits = '';
title('Pole-Zero Map')
h.AxesGrid.BackgroundAxes.Title.Interpreter = 'Latex';
h.AxesGrid.BackgroundAxes.XLabel.Interpreter = 'Latex';
h.AxesGrid.BackgroundAxes.YLabel.Interpreter = 'Latex';
  1 commentaire
Ajira
Ajira le 6 Août 2019
Modifié(e) : Ajira le 6 Août 2019
Hi Adam,
thx it works properly.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Labels and Annotations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by