How to read time from a .txt file ?
Mostra commenti meno recenti
I have got a column of time in the format "hh:mm:ss.SSS". How do i read this entire column in Matlab and convert it into decimal ?
1 Commento
madhan ravi
il 5 Mar 2019
Use readtable() to read the file.
The problem is Matlab is only reading hh:mm:ss . I have my data in milliseconds like this 00:00:01.456 . How do i potentially convert this to decimal system?
With the example you gave it worked fine for me. Perhaps show the code that you are trying to read the file and if possible upload the file.
Risposte (1)
Prajwal Kadlaplamutt Ravindra Kumar
il 5 Mar 2019
0 voti
1 Commento
Peter Perkins
il 11 Mar 2019
Prajwal, this may just be a display issue. Try this:
t.Time.Format = "hh:mm:ss.SSS"
(Substitute the correct names of your table and the time variable.) If that's not it, you should confirm that you are reading them in as durations (which has only been suppoted since R2018a IIRC).
Your code uses load. I'm not even sure what that would do on your file. Use readtable.
Categorie
Scopri di più su Standard File Formats in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!