How can I have 'angstrom square' as unit of y axis in a plot?
25 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need use 'angstrom square' as unit of y axis in a plot. I tried: >>ylabel('MSD (\AA^{2})','Interpreter','latex','Fontname','TimesNewRoman') but it did not work. The version of my Matlab is R2014a.
Thank you.
0 Kommentare
Antworten (1)
Star Strider
am 29 Sep. 2017
You forgot the dollar signs ($):
figure(1)
plot(rand(1,100), rand(1,100), 'pg')
ylabel('$MSD (\AA^{2})$','Interpreter','latex','Fontname','TimesNewRoman')
or:
ylabel('MSD ($\AA^{2}$)','Interpreter','latex','Fontname','TimesNewRoman')
Another option:
angsqr = [char(197) char(178)]
angsqr =
'Ų'
3 Kommentare
Star Strider
am 30 Sep. 2017
As always, my pleasure!
If my Answer solved your problem, please Accept it!
Eugenio
am 20 Mär. 2023
Another option would be
angs = [char(197)];
ylabel(strcat( angs ,'^{n}') )
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
