MATLAB Extract data from a huge file using matlab

  • Thread starter Thread starter Monica_xinchi
  • Start date Start date
  • Tags Tags
    Data File Matlab
AI Thread Summary
To extract data from a large text file in MATLAB, users can utilize the import feature by locating the file in the MATLAB file browser and right-clicking to access the import options. This process allows for specifying how the data should be imported, accommodating both numerical and textual data. Recent MATLAB versions offer an option to automatically generate an M-file for the import process, streamlining future data extraction from similar files. This method simplifies the task of extracting useful data for calculations. Utilizing these features can enhance efficiency when working with large datasets in MATLAB.
Monica_xinchi
Messages
1
Reaction score
0
extract data from a "huge" file using matlab

hi guys,
I need some help!
I have a file(.txt) which concludes about 20,000 lines. There are not only number data but also letters and different characters in the file. I want to extract some certain useful data from this file and put them into a calculation program.

could you guys please write a .m file for me?
 
Physics news on Phys.org


Matlab should handle this for you automatically. Locate the file in the Matlab file browser, right-click on it, and import it. A dialog will pop up that allows you to specify precisely how Matlab imports the data; as an added bonus, recent versions of Matlab also allow you to specify that it should automatically generate an M-file for the import, allowing you quickly to repeat the procedure on similar files without having to use the import dialog.
 

Similar threads

Replies
3
Views
1K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
18
Views
6K
Back
Top