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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容