i have to read only these three value (marked in the screenshot) from the file.
How to read Value from .txt
1 view (last 30 days)
Show older comments
Arun Kumar Singh
on 15 Jun 2020
Commented: Arun Kumar Singh
on 15 Jun 2020

Accepted Answer
Walter Roberson
on 15 Jun 2020
filename = 'File.txt';
fid = fopen(filename, 'rt');
GAL = cell2mat(textscan(fid, '%*s%f%f%f', 1, 'headerlines', 2, 'collectoutput', true));
fclose(fid);
More Answers (0)
See Also
Categories
Find more on Text Data Preparation 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!