xlabel with non italic mu in latex

20 vues (au cours des 30 derniers jours)
Tim Krzyzanowski
Tim Krzyzanowski le 16 Nov 2018
Commenté : Rick le 27 Fév 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?

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by