LaTex with 2 strings separated by a num2str
5 ビュー (過去 30 日間)
古いコメントを表示
Hi all, I have what I hope to be a simple question. This is the code I am working on now.
errordisplay=[' $\varepsilon_{RTP}=$ ',num2str(rtep),];
text(30,15,errordisplay,'interpreter','latex')
I want to add a percent sign after the conversion of 'rtep'. But when I do this
errordisplay=[' $\varepsilon_{RTP}=$ ',num2str(rtep),'%'];
the conversion of ' $\varepsilon_{RTP}=$ ' goes away and leaves the string as typed.
Any ideas?
Thanks in advance
0 件のコメント
採用された回答
Star Strider
2019 年 4 月 19 日
Try this:
errordisplay=[' $\varepsilon_{RTP}=$ ',num2str(rtep),'\%'];
It seems you need to ‘escape’ the ‘%’.
2 件のコメント
その他の回答 (1 件)
David Wilson
2019 年 4 月 19 日
Use an escape (backslash) for the %
errordisplay=[' $\varepsilon_{RTP}=$ ',num2str(rtep),'\%'];
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で LaTeX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!