string to number
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi I have an array which looks like this:
'''27/01/2012 15:30:00'''
'''27/01/2012 15:31:33'''
'''27/01/2012 15:49:19'''
'''27/01/2012 15:49:19'''
'''27/01/2012 15:50:26'''
I want to just have the TIME and in a NON-STRING format. Any help?
3 commentaires
Réponse acceptée
Mate 2u
le 14 Fév 2012
2 commentaires
Friedrich
le 14 Fév 2012
one can use datestr and datenum to do it in a dirty way:
a_1 = datenum('27/01/2012 15:30:00','dd/mm/yyyy HH:MM:SS')
a_2 = datenum('27/01/2012 15:31:33','dd/mm/yyyy HH:MM:SS')
tmp = datestr(a_1:0.00001:a_2);
time_stamps = unique(mat2cell(tmp,ones(108,1),20))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Dates and Time dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!