How to read Value from .txt
Show older comments
Here i am attaching screenshot of my file which is in .txt format, i have to read the three values (Marked in the screenshot) from the file. Could you please help me in this ??6 Comments
Arun Kumar Singh
on 15 Jun 2020
Walter Roberson
on 15 Jun 2020
Will it always be the third line? If not then will it always be the GAL line?
Stephan
on 15 Jun 2020
Please attach the file by using the paperclip button
Arun Kumar Singh
on 15 Jun 2020
Walter Roberson
on 15 Jun 2020
Edited: Walter Roberson
on 15 Jun 2020
fopen(), textscan() with headerlines 2, format '%*s%f%f%f', 'collectoutput', true, and count 1 (the count goes immediately after the format and before any other options.) cell2mat() the result of textscan() to get the numeric data. fclose()
Arun Kumar Singh
on 15 Jun 2020
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Export 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!