Getting a vector from specific data dates

时间:2018-04-20 00:34:06

标签: matlab

>> find(date<='01-Apr-2013 00:00:00' & date>'01-May-2013 00:00:00')

ans =

  1×0 empty double row vector

Why am I getting this as an answer and not a vector of the dates I am trying to pull from the data?

1 个答案:

答案 0 :(得分:1)

You are looking for a date that is both before 01-Apr-2013 and after 01-May-2013. Since May is after April, no such date exists, obviously find is going to return empty.