MATLAB: How to create sequence datetime in matlab by specific duration

time interval creation

I want to create a set of date time in this format datetime
date=('01/12/2016 00:15:00','InputFormat','dd/MM/yyyy HH:mm:ss')
from
if true
t1 = datetime('01/12/2016 00:15:00','InputFormat','dd/MM/yyyy HH:mm:ss');
t2 = datetime('31/12/2016 23:45:00','InputFormat','dd/MM/yyyy HH:mm:ss');
end
How to create sequence datetime in matlab by specific 15 mins interval from t1 to t2 ?

Best Answer

t1:minutes(15):t2