Reading .txt file as Table in MATLAB
8 views (last 30 days)
Show older comments
Marissa Whitby
on 7 Oct 2021
Answered: Marissa Whitby
on 8 Oct 2021
I'm trying to extract a single value from a .txt file. My goal was to make it a table and then just extract the value I need using the indices of the table. I imported it as a table in MATLAB but the tabs don't seem to be done right in the file so the table MATLAB makes is just one column.
This is the .txt file I have (included as attachment)

The only value I need from this file is the 5829124.91427529 number in the bottom right.
Here is the output and then the code for what I was trying to do:
Output:

Code:
filedata = readtable(file,'delimiter','\t','readvariablenames',true);
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Workspace Variables and MAT Files 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!