matlab fid function
this is part of matlab help try to see it in your matlab help
fopen
Open file, or obtain information about open files
Syntax
fid = fopen(filename)
fid = fopen(filename, permission)
fid = fopen(filename, permission_tmode)
[fid, message] = fopen(filename, permission)
[fid, message] = fopen(filename, permission, machineformat)
[fid, message] = fopen(filename, permission, machineformat, encoding)
fids = fopen('all')
[filename, permission, machineformat, encoding] = fopen(fid)
Description
fid = fopen(filename) opens the file filename for read access. (On Windows® systems, fopen opens files for binary read access.) The filename argument is a string enclosed in single quotes. It can be a MATLABPATH relative partial pathname if the file is opened for reading only. A relative path is always searched for first with respect to the current directory. If it is not found, and reading only is specified or implied, then fopen does an additional search of the MATLABPATH.
fid is a scalar MATLAB® integer, called a file identifier. You use the fid as the first argument to other file input/output routines. If fopen cannot open the file, it returns -1. Two file identifiers are automatically available and need not be opened. They are fid=1 (standard output) and fid=2 (standard error).
fid = fopen(filename, permission) opens the file filename in the specified permission. The permission argument can be any of the following:
Permission Specifiers