keep scientific notation in plot title
Mostra commenti meno recenti
I have a variable in scientific notation as
a=1.2310^-3
if I use
b=string(a)
to add b to a plot title
I get in the title
0.000123
any way to avoid this and keep in the title 1.23^-3 ???
Thanks
Renzo
Risposte (1)
Rik
il 24 Mag 2020
0 voti
If you want a specific notation you can enforce that with the sprintf function. Otherwise Matlab will automagically pick a format for you.
2 Commenti
Lorenzo Mattera
il 24 Mag 2020
Rik
il 24 Mag 2020
In this situation num2str will do the trick, but in the future you would probably need to look into the sprintf function.
Categorie
Scopri di più su Grid Lines, Tick Values, and Labels in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!