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 Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by