Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to get the index from a datetime array corresponding to a time duration?

3 vues (au cours des 30 derniers jours)
yashvin
yashvin le 2 Juil 2015
Commenté : yashvin le 2 Juil 2015
Hi I am trying to get the starting and ending index from a datetime array that corresponds to a specific time duration.
Find below my code for a general datetime array
t1 = datetime('23-Feb-2015 09:43:08')
num=2000
t2 = t1 + seconds(1:num)
I am interested in getting the starting and ending index from t2 with a time step durations of 5min.
index1=starting and ending index from t2 which corresponding to first 5 min.
index2=starting and ending index from t2 which corresponding to next 5 min .
.
.
.
index= starting and ending index from t2 which corresponds to remaining time.
I tried something using "minutes" but i do not know how to access the starting and ending index from t2. Can you please help?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by