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

2 views (last 30 days)
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

Answers (1)

dpb
dpb on 8 Oct 2014
Edited: dpb on 8 Oct 2014
"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.

Categories

Find more on Polar Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!