View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 3.1 KB File ID: #35063 Version: 1.0
image thumbnail




Returns the number of channels, header lines, and the delimiter string for a given text file.

| Watch this File

File Information

The Util_GetFileInfo function returns the number of channels, header lines, and the delimiter string for the file with name FILENAME.

Several assumptions are made about the data file:
1. The last line in the file contains a representative line of data
2. The delimiter is either a comma, semicolon, tab, or space
3. In a line of data, the number of actual delimiters exceeds the number of any of the other candidate delimiters (commas, tabs, &c.)
4. The first three lines of data have matching data types (i.e., number or string) and all have the correct number of channels. Everything preceding this point is considered to be the header.

> FILENAME - the name of the file whose number of channels, number of header lines, and delimiter string will be determined.

> CHAN - the number of channels in the data file
> HEADERLINES - the number of header lines in the data file
> DELIM - the data file's delimiter string (e.g., ';')
> PATTERN - the pattern string to be used in file loading (e.g., %f%f%f)

Written by Alex Andrews.
Last updated: February 13th, 2012.

FeatureFinder is a free MATLAB tool that lets you organize your signals, visually review them with speed and ease, apply filters and normalization, and export meaningful signal features in a ready-to-analyze format. Learn more at

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us