Version (3.34 KB) by Mike
Reads the last N lines of a CSV file without needing to load and parse the entire file.
Updated 5 Oct 2017

View License

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 (2024). csvreadtail (https://www.mathworks.com/matlabcentral/fileexchange/64278-csvreadtail), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

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