I'd like to use a subscript in equation in legend in a Bode plot with the following code
s=tf('s');
G=725/((s+1)*(s+2.5)*(s+25));
Go=G/(s+1);
DeltaG=-s/(s+1);
IDG=1/DeltaG;
F=1;
T1=feedback(F*G,1);
figure
h=bodeplot(IDG,T1);
setoptions(h,'PhaseVisible','off')
set(findall(gcf,'type','line'),'linewidth',2)
h1=legend('$\Delta_{G}$','$T$');
set(h1,'Interpreter','latex')
the legend for the blue line should be

 採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 10 月 4 日

0 投票

s=tf('s');
G=725/((s+1)*(s+2.5)*(s+25));
Go=G/(s+1);
DeltaG=-s/(s+1);
IDG=1/DeltaG;
F=1;
T1=feedback(F*G,1);
figure
h=bodeplot(IDG,T1);
setoptions(h,'PhaseVisible','off')
set(findall(gcf,'type','line'),'linewidth',2)
h1=legend('$\Delta\_{G}$','$T$','Location','southwest','FontSize',12);
set(h1,'Interpreter','latex')

2 件のコメント

Anna
Anna 2023 年 10 月 4 日
Great, it is exactly what I was looking for.
Thanks a lot!
Dyuman Joshi
Dyuman Joshi 2023 年 10 月 4 日
You are welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

リリース

R2022b

タグ

質問済み:

2023 年 10 月 4 日

コメント済み:

2023 年 10 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by