Pairwise difference of datetime vectors (i.e. pdist for time data)
Afficher commentaires plus anciens
I have two datetime vectors of differing lengths (500x1 and 15000x1) and was wondering how to produce a 500x15000 matrix of the differences between these times. I've previously used pdist2() to answer this question for double vectors, but can't find the function to do it for datetimes.
Réponse acceptée
Plus de réponses (1)
dpb
le 2 Juil 2019
1 vote
Presuming not excessive precision, one could convert to datenum, compute distances and then return to datetime
Seems like a feature enhancement.
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!