how to covert matlab time to actual time

3 ビュー (過去 30 日間)
swetha S
swetha S 2019 年 10 月 18 日
回答済み: Andrei Bobrov 2019 年 10 月 18 日
I used [num txt raw]= xlsread(sprintf( 'SMPS%d.xlsx',n),'Data'); to read the excel files. The raw variable is of dimension (480*109). The first three columns are "sample no, date , time". The original format for time is HH:MM:SS but in Matlab the time column has values 0.0035,0.0056,0.0077 etc. I want to convert this whole column to actual time values as i have to further process this using time.
  2 件のコメント
Andrei Bobrov
Andrei Bobrov 2019 年 10 月 18 日
Here ttach your xlsx-file.
swetha S
swetha S 2019 年 10 月 18 日
.xlsx file

サインインしてコメントする。

採用された回答

Andrei Bobrov
Andrei Bobrov 2019 年 10 月 18 日
T = readtable('SMPS1.xlsx','Sheet','Data','Range','1:481');
T.Time = dateshift(datetime(T.Date,'InputFormat','MM/dd/uuuu') + seconds(T.StartTime*24*60*60),'start','second','nearest');
TT = table2timetable(T(:,[4:end]));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by