Hi all,
I have a question:
I have a figure and I want to change the x axis (which are numbers from 1 to 48) to time scale, like this:
00:00 00:30 01:00......................23:30
any ideas?
thanks

Antworten (2)

Peter Perkins
Peter Perkins am 26 Apr. 2017
Bearbeitet: Peter Perkins am 26 Apr. 2017

1 Stimme

In MATLAB R2014b or newer, try this:
>> t = duration(0:.5:23.5,0,0,'Format','hh:mm');
>> x = rand(size(t));
>> plot(t,x)
Jan
Jan am 26 Apr. 2017

0 Stimmen

Did you try datetick already?

1 Kommentar

thanks for the answer I tried this
datetick('x','HHPM')
but I am getting "12AM" everywhere

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 26 Apr. 2017

Bearbeitet:

am 26 Apr. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by