fopen函数

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.

你可能感兴趣的:(fopen函数)