How to plot y-axies?

6 vues (au cours des 30 derniers jours)
skysky2000
skysky2000 le 15 Mar 2017
Commenté : Rik le 15 Mar 2017
Dear all, Could help me please about how to plot y-axies as seen in the figure below:
Thanks...

Réponses (2)

Rik
Rik le 15 Mar 2017
Modifié(e) : Rik le 15 Mar 2017
This is a logarithmic plot. So when you use the semilogy function, you can use
set(gca,'YTick',[1 2 8 16])
On newer versions of Matlab (I believe 2015b and later), you can use the yticks function (see this help page).

skysky2000
skysky2000 le 15 Mar 2017
not work.
  1 commentaire
Rik
Rik le 15 Mar 2017
What code are you using, because I get the axis you need with the code below:
x=[250 500 600 700 780];
y=[16 8 4 2 1];
semilogy(x,y)
set(gca,'YTick',[1 2 4 8 16])

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by