Reading textfile using fopen and textscan
Afficher commentaires plus anciens
Hello,
I've got a textfile 'test_file.txt' which you can find in attachment.
At the bottom of this textfile, you can see ' [Channel Data] '. I would like to extract all headers beneath ' [Channel Data] ' except the last 2. So I would like to extract the headers ' S.No., Data&Time, hf2, hf3, hf4, hf10, hf6, tc18, tc3, tc5, tc7, tc9, tc11, tc12, tc13, tc15, tc16, tc2'. So the 'Alarm in Channels' and the 'Alarm Out' are left out. In total this would give 18 headers. (See picture in attachment for clarification)
I also would like to extract all the data in the rows beneath the headers. These numbers are seperated by a comma (comma delimiter) and in total there are also 18 numbers in 1 row. I am familiar using fopen and textscan, but I'm not sure how to use it to get what I would like to have...
Thank you
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Large Files and Big Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!