xlabel with non italic mu in latex

18 Ansichten (letzte 30 Tage)
Tim Krzyzanowski
Tim Krzyzanowski am 16 Nov. 2018
Kommentiert: Rick am 27 Feb. 2020
Hello i want to label my x-axis with Latexcode.
I want it in this format
t / µs
as you can see i need to have the t in italic and the µs in non italic. I used to try this code:
xlabel(['$\it t/ \mathrm{\mu s}$'],'interpreter','latex')
but the Latex interpreter is printing the \mu always in italic is there any posibility to solve this?

Akzeptierte Antwort

Adam Danz
Adam Danz am 16 Nov. 2018
Bearbeitet: Adam Danz am 16 Nov. 2018
You can enter the µ character directly; no need for latex.
xlabel('{\itt} / µs', 'interpreter', 'tex')
  3 Kommentare
Adam Danz
Adam Danz am 27 Feb. 2020
Try this.
>> [char(956), ' = 68']
ans =
'μ = 68'
>> [char(963), ' = 4']
ans =
'σ = 4'
Rick
Rick am 27 Feb. 2020
Amazing! Thanks very much Adam.
Rick

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by