plot x-axis data with discretize
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello experts,
simple question ..
x = 0:2:24;
y= rand(1,13);
plot(x,y)
How can I plot x-axis where it would be like this (0,2,4,6,8 .......etc)?
thanks indeed..
댓글 수: 0
채택된 답변
Star Strider
2021년 5월 18일
Perhaps something like this —
x = 0:2:24;
y= rand(1,13);
plot(x,y)
xticks(0:2:24) % 'xticks' Function Introduced In R2016b
xlim([min(x) max(x)]) % Optional
.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!