필터 지우기
필터 지우기

Help with axis on a plot

조회 수: 1 (최근 30일)
Emily
Emily 2019년 3월 1일
답변: Yasasvi Harish Kumar 2019년 3월 1일
I am needing to plot the function of a monthly increase in bank balance but need the x-axis in years instead of months and am wondering how to achieve this.

채택된 답변

Yasasvi Harish Kumar
Yasasvi Harish Kumar 2019년 3월 1일
Hi,
All you have to do is divide your x-axis by 12.
For example:
plot(x,y) %gives you the axis in months
Change this to,
x = x/12;
plot(x,y)
I hope that fixes your issue.
Regards

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by