labelling x and y axis in pole zero map with latex

조회 수: 19 (최근 30일)
Ajira
Ajira 2019년 8월 5일
편집: Adam Danz 2019년 8월 6일
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

채택된 답변

Adam Danz
Adam Danz 2019년 8월 5일
편집: Adam Danz 2019년 8월 6일
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
Ajira
Ajira 2019년 8월 6일
편집: Ajira 2019년 8월 6일
Hi Adam,
thx it works properly.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 LaTeX에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by