Uncategorized

How to add Datetime to my time column in Matlab or Python


I am currently working on constructing my dataset after extracting signals from a (.mat) database in Matlab.

[X,Y]=extract_structures(filename);

time=X(1).Data;

time =

Columns 1 through 6

         0    0.0100    0.0200    0.0300    0.0400    0.0500

  Columns 7 through 12

    0.0600    0.0700    0.0800    0.0900    0.1000    0.1100

 Columns 5 119 through 5 124

   51.1803   51.1903   51.2003   51.2103   51.2203   51.2303

  Columns 5 125 through 5 127

   51.2403   51.2503   51.2603

The X representing time. I extracted this time variable and other signals and constructed my data vector, starting with the first column as time, following this syntax :

data = [time’ variable_u’ variable_y’……. ];

To be able to use the csv file in Python my dataset should have a date column that contains the datetime of the time-series.

How can I achieve the transformation of the ‘time’ column into a datetime format using Matlab before exporting the csv file into Python.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *