Change Resolution (step size) of axes

조회 수: 516 (최근 30일)
Anirudh Roy
Anirudh Roy 2020년 7월 1일
답변: Gurpreet Singh 2020년 7월 1일
I wanted to know how to change the step size of the axes in a matlab plot (for eg if the range on Y axis is 0-A, and i want to have markings on ya axis in the steps of A/10 how do tell matlab to do that)

채택된 답변

Gurpreet Singh
Gurpreet Singh 2020년 7월 1일
Hi Anirudh,
The following commands might help you.
plot(x,y);
ylim([0,A]);
yticks(0:(A/10):A);
Please refer to the https://in.mathworks.com/help/matlab/creating_plots/change-tick-marks-and-tick-labels-of-graph-1.html (change-tick-marks-and-tick-labels) documentation for more information.

추가 답변 (1개)

TADA
TADA 2020년 7월 1일
plot(1:10);
ylim([1,10]);
yticks(1:10);

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by