Code covered by the BSD License  

Highlights from
linecount

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 1.2 KB File ID: #42497

linecount

by Guru

 

08 Jul 2013

Counts the number of lines in a text file

| Watch this File

File Information
Description

By knowing the number of lines in a text file that you want to read, you can do more advanced file I/O reads efficiently. For example if you want to use textscan to read a block of data at once. Skip several lines, then read another block of data. Repeating this until the EOF.

Another scenario is if you want to read just the Nth line from the EOF, but you don't know what line that is to know how many headerlines you want to skip

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File  
Everyone's Tags
data import
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Contact us