fopen函數(shù)

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.

出錯:數(shù)據(jù)不在同一folder內(nèi)。

'wb':文件系統(tǒng)會按純粹的二進(jìn)制格式進(jìn)行操作,因此也就不存在格式轉(zhuǎn)換的問題了。

返回值: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.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容