find a value in a vector of type char

5 Ansichten (letzte 30 Tage)
Rica
Rica am 15 Nov. 2012
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 Kommentar
Jan
Jan am 15 Nov. 2012
Bearbeitet: Jan am 15 Nov. 2012
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 15 Nov. 2012
ismember(data_time,{'7.5.2012' '2:20:59'},'rows');

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 15 Nov. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by