finding index of precise value
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rica
am 7 Jul. 2015
Beantwortet: Andrei Bobrov
am 7 Jul. 2015
Hi all, I try to use this function:
l=find(find(strcmp(Time,'09:00:00'))). Time is an known cell.
How could make a loop for this function to find the index of each minute:
l=find(find(strcmp(Time,'09:00:00')))
l=find(find(strcmp(Time,'09:01:00')))
l=find(find(strcmp(Time,'09:02:00')))
.
.
.
l=find(find(strcmp(Time,'10:00:00')))
l=find(find(strcmp(Time,'10:01:00')))
and so on
Thie Time cell is of 500ms steps.
Thank you
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 7 Jul. 2015
d = datenum(Time);
vt = datevec(d);
out = find(vt(:,6) == 0);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!