Effacer les filtres
Effacer les filtres

values instead of points

6 vues (au cours des 30 derniers jours)
Lama Hamadeh
Lama Hamadeh le 10 Juil 2017
Commenté : Lama Hamadeh le 10 Juil 2017
Dear all,
I have the following code:
xmin=27.5;
xmax=35.5;
ymin=32.8;
ymax=62.5;
x=linspace(xmin,xmax,100);
y=ymin+((x-xmin)/(xmax-xmin))*(ymax-ymin);
plot(y)
My question is: when I plot (y), as shown in the photo attached, the x axis appears to show the number of points, from 1 til 100, but not the values of these points! How can I show the values of the points on the x axis instead of their corresponding point number.
Many thanks,
Lama

Réponse acceptée

KSSV
KSSV le 10 Juil 2017
Use
plot(x,y)
instead of
plot(y)
  1 commentaire
Lama Hamadeh
Lama Hamadeh le 10 Juil 2017
Perfect!!! Many thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by