Load parts of a data file

Version 1.2.0.0 (1.68 KB) by Kaare
Function allowing loading of every n'th row and arbitrary columns of named file.
265 Downloads
Updated 27 Jan 2014

View License

Essentially a wrapper for textscan, but requiring less everyday coding. Just tell the function the file, whether you want all rows or every n'th, which (or all) columns you want, and the maximum number of rows to load (if you don't know how big the file is).

The script assumes that an individual line in the file is of a manageable size, and that all lines have the same length.

Cite As

Kaare (2024). Load parts of a data file (https://www.mathworks.com/matlabcentral/fileexchange/40654-load-parts-of-a-data-file), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Low-Level File I/O in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

discovered some problems which slowed down the loading considerably, these have now been fixed.

1.0.0.0