xlabel with non italic mu in latex

28 visualizzazioni (ultimi 30 giorni)
Tim Krzyzanowski
Tim Krzyzanowski il 16 Nov 2018
Commentato: Rick il 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?

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by