The code below finds the index of every timestamp at 3:30.
timeStr=cellstr(datestr(time));timeDbl=datevec(timeStr);times=and(timeDbl(:,4)==14,timeDbl(:,5)==30);priceIdx=find(times);
How can I encompass/index a half hour block of time? This is what I'm trying to do.
times=and(timeDbl(:,4)==14,timeDbl(:,5)==30:59);
Any suggestions?
Best Answer