How to format notation to use "... x 10^-5..." instead of "...e..." in this figure
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
attached figure
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Dyuman Joshi
am 11 Mai 2023
%Random graph
syms x
fplot(jacobiP(1:4,4,4,x))
axis([-1 2 -5 5])
grid on
%Values to be displayed as the legend
arr = rand(4,1)*1e-4
out=floor(log10(arr)); %take abs() of arr in case of negative values
str = compose('%f x 10^{%d}', arr./10.^out, out)
legend(str,'Location','best')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend 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!