How can I get an upright mu in math with latex interpreter?

20 次查看(过去 30 天)
I want to display where mu is upright and not italic. Matlab renders the mu always in italic but I need it upright as my university requires it this way. Is there any way to do this?
  3 个评论
Walter Roberson
Walter Roberson 2020-9-10
If it does not need to be latex interpreter then possibly using 'i̅/μA' with interpreter tex or none would work ? That is
i U+0305 / U+03BC A

请先登录,再进行评论。

回答(1 个)

Robert U
Robert U 2020-9-11
编辑:Robert U 2020-9-11
Hi Philipp Rehlaender,
It seems, there is no straight-forward way to do that in matlab figures. Nonetheless, there are work-arounds that help to create a look-like:
Despite that you can create your text freely using unicode. Helpful is the wikipedia list of Unicode blocks. Signs above characters are known as Combining Diacritical Marks.
Writing your requested line in standard text font as axes label:
textbar = sprintf('\x0304'); % is not the bar but looks better, for correct "bar" use \x0305
textmu = sprintf('\x03BC');
fh = figure;
ah = axes(fh);
ah.XLabel.String = sprintf('%s/%s%s',append('i',textbar),textmu,'A');
Edit: That is, what Walter suggested in short.
Kind regards,
Robert
  3 个评论
Walter Roberson
Walter Roberson 2020-9-11
Note: Using unicode will unfortunately not work for Interpreter Latex .

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by