find a value in a vector of type char

1 次查看(过去 30 天)
i have vector composed from date and time for exemple:
%
date_time=[date time]
date_time=['06.09.2010' '1:18.25']
date is a 40000*1 cell
time is a 40000*1 cell
how could i find the index of a time_date= '7.5.2012' '2:20:59' with the function find or any other function?
thank you
  1 个评论
Jan
Jan 2012-11-15
编辑:Jan 2012-11-15
Are you looking for '7.5.2012' '2:20:59', while the data contain '07.07.2012' '02:20:59'? Using leading zeros would be a marvelous idea obviously.

请先登录,再进行评论。

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-11-15
ismember(data_time,{'7.5.2012' '2:20:59'},'rows');

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-11-15

类别

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