how to extract indices?

조회 수: 1 (최근 30일)
Lilya
Lilya 2021년 2월 1일
댓글: Mathieu NOE 2021년 2월 3일
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
Mathieu NOE
Mathieu NOE 2021년 2월 3일
glad it helped !

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by