How to plot a array of double data versus array of digital time data?

i have a array of time data like this 07:14:45:4546,07:14:47:3104....,i want to plot these in x axis with the other data in y axis.mean time i don't want to convert that time in to seconds & plot.Any suggestions would be appreciated.
DURAI

답변 (1개)

dpb
dpb 2014년 10월 8일
편집: dpb 2014년 10월 8일
"Not wanting to" is not sufficient reason not to do something very nearly equivalent (although it isn't converting to seconds so strictly speaking you haven't :) ). Instead convert to Matlab date numbers, plot, then format the time axis as you desire with datetick
doc datenum
doc datetick
Of course, if either
a) the data are evenly sampled, or
b) you don't care about true time spacing if not, then
you can simply plot versus position number and set 'xticklabel' property as you wish. But, in general it is much simpler to "do it right" via datenumbers as outlined above.

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2014년 10월 8일

편집:

dpb
2014년 10월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by