a vector of hours

8 views (last 30 days)
Margarita Hernández López-Briones
Answered: madhan ravi on 16 Feb 2021
How can I create a vector where the elements are 24 hours a day?
Thanks

Answers (1)

madhan ravi
madhan ravi on 16 Feb 2021
hours(0 : 23)
ans = 1×24 duration array
0 hr 1 hr 2 hr 3 hr 4 hr 5 hr 6 hr 7 hr 8 hr 9 hr 10 hr 11 hr 12 hr 13 hr 14 hr 15 hr 16 hr 17 hr 18 hr 19 hr 20 hr 21 hr 22 hr 23 hr

Categories

Find more on Dates and Time in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!