Is it possible to produce a plot in MATLAB with the axes scaled based upon the natural logarithm?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 5 Août 2009
Réponse apportée : Voss
le 21 Mar 2024
I know it is possible to scale axes based upon a base 10 log scale using the SEIMLOGX and SEMILOGY functions, but there does not seem to be any way to scale axes based upon a natural logarithm scale.
Réponse acceptée
MathWorks Support Team
le 5 Août 2009
The ability to scale axes based upon a natural logarithm scale is not available in MATLAB.
To work around this issue, plot the natural logarithm of the data on a linearly-scaled figure.
For example, try the following commands:
x = linspace(0, 100);
y = exp(x + 1);
plot(x, log(y))
0 commentaires
Plus de réponses (1)
Voss
le 21 Mar 2024
x = linspace(0, 100);
y = exp(x + 1);
semilogy(x,y)
yl = ylim();
n = ceil(log(yl(1))):10:floor(log(yl(2)));
yticks(exp(n))
yticklabels("e^{"+n+"}")
set(gca(),'YMinorTick','off')
0 commentaires
Voir également
Catégories
En savoir plus sur Labels and Styling dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
