how to extract indices?

5 次查看(过去 30 天)
Lilya
Lilya 2021-2-1
Hi,
I am trying to loop in time to extract it within the range of 23 to 1am and 11am to 13 using the following find function:
my problem is to do that for the days from 20 to 31 of March.
how can I loop over it? and extract the indices?
Note, the mtime is a 2D matrix which I need the first row for all column (1,:)
ntime=find(mtime>=datenum(2019,3,20,11,0,0) & mtime<=datenum(2019,3,20,13,0,0)...
& mtime>=datenum(2019,3,20,1,0,0) & mtime<=datenum(2019,3,20,23,59,0));
  5 个评论
Lilya
Lilya 2021-2-3
It works perfectly!! many many thanks

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by