fileID = fopen(filename,permission)opens the file with the type of access specified by permission.
f'ilename: Name of the file to open, including the file extension, specified as a string. If the file is not in the current folder, file name must include a full or a relative path.
If you open a file with read access and the file is not in the current folder, then fopen searches along the MATLAB search path.
If you open a file with write or append access and the file is not in the current folder, then fopen creates a file in the current directory.
出錯:數據不在同一folder內。
'wb':文件系統會按純粹的二進制格式進行操作,因此也就不存在格式轉換的問題了。
返回值:If fopen cannot open the file, then fileID is -1.
fileID = ?returns an integer file identifier equal to or greater than 3. MATLAB?reserves file identifiers0,1, and2for standard input, standard output (the screen), and standard error, respectively.