MATLAB Answers

0

Generate time sequence with 15 minutes step time

Asked by Daniel Boateng on 14 May 2019
Latest activity Commented on by Daniel Boateng on 14 May 2019
I want to generate a sequence of datetime from 1st March to 31st March with a step time of 15 minutes.
So the time will start from '01-Mar-2017 00:00:00','01-Mar-2017 00:15:00' ,'01-Mar-2017 00:30:00' to '31-Mar-2017 23:45:00';
I tried this code but it gives a step time of one day.
t1 = datetime(2017,03,1,0,0,0);
t2 = datetime(2017,03,31,23,45,0);
t= (t1:t2)';
Can anyone be of help please.
Thanks

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Fangjun Jiang on 14 May 2019
 Accepted Answer

t1:minutes(15):t2

  1 Comment

Sign in to comment.