values instead of points

3 ビュー (過去 30 日間)
Lama Hamadeh
Lama Hamadeh 2017 年 7 月 10 日
コメント済み: Lama Hamadeh 2017 年 7 月 10 日
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

採用された回答

KSSV
KSSV 2017 年 7 月 10 日
Use
plot(x,y)
instead of
plot(y)
  1 件のコメント
Lama Hamadeh
Lama Hamadeh 2017 年 7 月 10 日
Perfect!!! Many thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by