fopen :Open file, or obtain information about open files
例如
fid = fopen(filename, permission)%许可包括:
'r' Open file for reading
(default). 'w' Open file, or create new file, for writing; discard existing contents, if any.
'a' Open file, or create new file, for writing; append data to the end of the file.
'r+'
Open file for reading and writing. 'w+'
Open file, or create new file, for reading and writing; discard existing contents, if any. 'a+' Open file, or create new file, for reading and writing; append data to the end of the file.
'A' Append without automatic flushing; used with tape drives.
'W' Write without automatic flushing; used with tape drives.
fclose
feof
ST = feof(fid) returns 1 if the end-of-file indicator for the
ferror
fgetl
注意:读的是文件句柄!!
fgets
fprintf
fread
frewind
fscanf