Transform from excel HH:MM:SS data to Matlab
Show older comments
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 Comments
Arvind Sathyanarayanan
on 28 Jan 2019
Have you tried this?
https://www.mathworks.com/matlabcentral/answers/26605-converting-hh-mm-ss-into-seconds
madhan ravi
on 28 Jan 2019
Edited: madhan ravi
on 28 Jan 2019
Which version of matlab are you using? attach your excel file
Silvio Risse
on 28 Jan 2019
Answers (2)
madhan ravi
on 28 Jan 2019
0 votes
Use readtable() to read the file.
Silvio Risse
on 28 Jan 2019
0 votes
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!