How to display the midnight time in the x-axis ?

1 view (last 30 days)
find the attachment of the excel sheet having time from PM to AM in the midnight? I need to plot the time on x-axis from PM to AM (like 19:23PM and 01:02AM)?
  1 Comment
KALYAN ACHARJYA on 26 Jul 2018
Edited: KALYAN ACHARJYA on 26 Jul 2018
What about y axis? There is no 01:02AM time in csv file.

Sign in to comment.

Accepted Answer

jonas on 26 Jul 2018
Edited: jonas on 26 Jul 2018
I assume you have some start date, which is here set to 2000-1-1.
t1 = datetime(2000,1,1)+hours(time)
xtickformat('HH:mm a')
The subsequent 'a' in the xtickformat specifies AM/PM format

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by