duration to number(double)
829 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Juan Camilo Gómez Cadavid
il 28 Feb 2022
Commentato: Juan Camilo Gómez Cadavid
il 17 Ott 2022
Any workaround to convert duration (seconds, hours, etc...) to a numeric value (double)
0 Commenti
Risposta accettata
Steven Lord
il 28 Feb 2022
Use seconds, hours, etc. depending on how you want the duration array to be converted to a number.
d = duration(1, 2, 3)
s = seconds(d)
m = minutes(d)
h = hours(d)
5 Commenti
Walter Roberson
il 17 Ott 2022
When you apply minutes() or seconds() or days() or hours() to a double, then a duration object is created.
When you apply those functions to duration objects, double values are created.
For example
hours(days(7.2))
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!