© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. DanialPython for MATLAB Developmenthttps://doi.org/10.1007/978-1-4842-7223-7_5

5. Dates and Times

Albert Danial1  
(1)
Redondo Beach, CA, USA
 

Temporal data appears frequently in computational work. Measurements recorded from sensors, economic results, stock prices, time-stepping numeric simulations, and so on are useless without accompanying time values. In this chapter, we’ll cover Python’s datetime module which offers capabilities similar to MATLAB’s data type of the same name.

5.1 Time

Python’s time module has functions to return the current time, either in the local timezone or UTC; measure CPU or elapsed time; and sleep for a desired amount of time. ...

Get Python for MATLAB Development: Extend MATLAB with 300,000+ Modules from the Python Package Index now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.