필터 지우기
필터 지우기

Transform from excel HH:MM:SS data to Matlab

조회 수: 1 (최근 30일)
Silvio Risse
Silvio Risse 2019년 1월 28일
답변: Silvio Risse 2019년 1월 28일
Hello,
i want to transform a timestamp excel data which looks like HH:MM:SS to Matlab.
After it, the data should be convert into seconds.
I looked after it in the internet and found this:
Data=xlsread('Data.xls');
out=datestr(:,1),'HH:MM:SS');
After this code my data is a (column x 8) char vector.
8 because of HH:MM:SS. But it is useless for me. So is there any way to transform it, like i said, to seconds?
Thank you very much!
  댓글 수: 3
madhan ravi
madhan ravi 2019년 1월 28일
편집: madhan ravi 2019년 1월 28일
Which version of matlab are you using? attach your excel file
Silvio Risse
Silvio Risse 2019년 1월 28일
The latest Version.

댓글을 달려면 로그인하십시오.

답변 (2개)

madhan ravi
madhan ravi 2019년 1월 28일
Use readtable() to read the file.

Silvio Risse
Silvio Risse 2019년 1월 28일
datenum( '14:35:59.812', 'HH:MM:SS' ) .* (24*60*60) - datenum( '00:00:00', 'HH:MM:SS' ) .* (24*60*60)
Is a good choice for my problem.
Thank you !

카테고리

Help CenterFile Exchange에서 Time Series Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by