time series plot
古いコメントを表示
I am trying to plot tidal level over time, but am struggling to get the date and time accurately along the X-axis. The time data is currently in a date vector format of 6 columns [dd mm yy hh mm ss]. What is the best way to convert this data into a format which can be plotted on the x-axis against water level? The matrix lengths are the same. Cheers!
回答 (3 件)
Wayne King
2012 年 5 月 25 日
Did you use datenum and datetick?
t = (1900:10:1990)'; % Time interval
p = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633]'; % Population
plot(datenum(t,1,1),p) % Convert years to date numbers and plot
datetick('x','yyyy') % Replace x-axis ticks with 4 digit year labels.
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!