Hi all, I have a text file shown below that is generated every hour and i need to extract the time from the text file and data also. After an hour I need to use another file generated and plot the change in terms of graph
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Naveen Bandi
le 20 Nov 2017
Commenté : Naveen Bandi
le 20 Nov 2017
A sample of text file is shown below, any help is appreciated well in advance
0 commentaires
Réponse acceptée
Walter Roberson
le 20 Nov 2017
fopen() the file. textscan() with a format to read just the entries on the first line, specifying a repeat count of 1 (that count goes after the format specification in the textscan call.) textscan() again, this time with the format to read the data, and giving the HeaderLines, 1 option to skip the text header line that is on the second line of the file. fclose() the file.
4 commentaires
Walter Roberson
le 20 Nov 2017
You said you need to read the time. The time is stored on the first line.
Before going a complete solution, it would help to know which columns of the data you want to extract.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Text Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!