values instead of points

조회 수: 2 (최근 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 CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by