Plot as a decimal and not a fraction
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Marisabel Gonzalez
am 30 Dez. 2018
Bearbeitet: Star Strider
am 30 Dez. 2018
xtext = ['$\it{\bf{(A_{B}C)^{',rats(m),'}}}$'];
xlabel(xtext,'Interpreter','Latex','FontSize', 15 )
This is my code for my xlabel.
m, the slope, is always returned as a fraction and not as a decimal.
when I type "format bank" on the line before I still get the same result in my xlabel
0 Kommentare
Akzeptierte Antwort
Star Strider
am 30 Dez. 2018
Bearbeitet: Star Strider
am 30 Dez. 2018
Change that to something else if you want a decimal output.
Example —
m = pi;
xtext = sprintf('$\\it{\\bf{(A_{B}C)^{%.2f}}}$', m)
produces:
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown 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!