csvreadtail

Reads the last N lines of a CSV file without needing to load and parse the entire file.

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Good for reading the last few lines off of large CSV data files, especially if you don't know ahead of time how many lines there are in the file (in which case you could just use csvread() with a specified range)

Cite As

Mike (2026). csvreadtail (https://www.mathworks.com/matlabcentral/fileexchange/64278-csvreadtail), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
2.0.0.0

Bugfixes to ensure CSVs containing non-numeric and empty cells are handled appropriately, added unit test function.

1.0.0.0