How can I change the scale of Y axis with datetick and in 'MM:SS.FFF' ?

1 回表示 (過去 30 日間)
Martinppp
Martinppp 2018 年 2 月 21 日
回答済み: Star Strider 2018 年 2 月 21 日
I have in Y axis values from 00:00.000 to 2:09.098 in 'MM:SS.FFF' from datetick.
I would like to know how can I easily change the scale?
For example to have in Y axis values from 1:50.500 to 2:10.000 with a 00:00.500 step.
Thank you
Martin

回答 (1 件)

Star Strider
Star Strider 2018 年 2 月 21 日
This will create the duration (link) array:
td = (datenum([0 0 0 0 2 11.0]) - datenum([0 0 0 0 1 50.5]))*24*60*60*1000;
tv = duration(0,1,50,500:500:td, 'Format','mm:ss.SSS');
I refer you to Plot Dates and Durations (link) for those details.

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by