How to plot a array of double data versus array of digital time data?
Ältere Kommentare anzeigen
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
Antworten (1)
"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.
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!