SHORTREAD Read matrix from short file.

Usage: >> A = shortread(filename,size,'format',offset)

Inputs:
filename   
Read matrix a from specified file while assuming four byte short integers.
size   
The vector SIZE determine the number of short elements to be read and the dimensions of the resulting matrix. If the last element of SIZE is INF the size of the last dimension is determined by the file length.

Optional inputs:
'format'   
The option FORMAT argument specifies the storage format as defined by fopen(). Default format ([]) is 'native'.
offset   
The option OFFSET is offset in shorts from the beginning of file (=0) to start reading (2-byte shorts assumed). It uses fseek to read a portion of a large data file.

Author: Sigurd Enghoff, CNL / Salk Institute, La Jolla, 7/1998

See also: floatread, floatwrite, fopen()

See the matlab file shortread.m (may require other functions)

Back to functions