Problem 45398. Seconds
Given the number of seconds after 12 am, find the time in the given format (12/24).
If the format is not mentioned, use 24-hour format.
For example,
sec = 120s output = '12:02:00:000 AM'
Solution Stats
Problem Comments
-
1 Comment
ChrisR
on 20 Sep 2020
A nice problem that helped me to learn about the flexibility of MATLAB's built-in functions
Solution Comments
Show commentsProblem Recent Solvers14
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2806 Solvers
-
Getting the indices from a vector
11685 Solvers
-
121 Solvers
-
Is this triangle right-angled?
6361 Solvers
-
Doubling elements in a vector (★★)
96 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!