labelling x and y axis in pole zero map with latex

3 ビュー (過去 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 Center および File ExchangeLabels and Annotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by