transforming minutes into time
Afficher commentaires plus anciens
let col1 contain the following values
905
990
1117
1228
1306
16
149
211
276
347
418
478
533
581
631
679
730
795
How can I transform the above values into time HH:MM. 905/60=15,08. or 15:05 o'clock and so on
Réponse acceptée
Plus de réponses (2)
Azzi Abdelmalek
le 6 Mai 2016
Modifié(e) : Azzi Abdelmalek
le 6 Mai 2016
a=[90;990;;1117;54;60]
h=fix(a/60)
m=mod(a,60)
out=arrayfun(@(x,y) [sprintf('%d',x) ':' sprintf('%d',y)],h,m,'un',0)
k=datenum(out,'HH:MM')
out=datestr(k,'HH:MM')
AA
le 6 Mai 2016
0 votes
Catégories
En savoir plus sur Chebyshev 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!