필터 지우기
필터 지우기

Could anyone help me to plot the graph.

조회 수: 3 (최근 30일)
Prabha Kumaresan
Prabha Kumaresan 2018년 3월 28일
댓글: Prabha Kumaresan 2018년 3월 28일
I am using the following lines in my code to plot the graph. code:
xlim([0,25]);
set(gca,'XTick',[0:1:25]);
with respect to xaxis i need to have only 0,1,2,23 (only four numbers)
If i use the above lines in my code it is displayed as
0,1,2,3,...............25.
what should I do inorder to get only 0,1,2,23 in the graph.

채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 28일
set(gca, 'XTick', [0, 1, 2, 23]);
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 3월 28일
The data you are plotting, are the x values for it only 0, 1, 2, and 23, and nothing else?
Is it necessary that the data cursor should show the 23 when it is over information in that range, or is it okay if the data cursor can be wrong?
... And you are still using R2015b, right?
Prabha Kumaresan
Prabha Kumaresan 2018년 3월 28일
s i am using R2015b. the spacing between 2 and 23 are very long and are not needed.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by