
matlab中fid=fopen('magic.m','r') 其中fid 和 r 分别代表什么含义
1个回答
展开全部
fopen
Open file, or obtain information about open files
Syntax
fid = fopen(filename)
fid = fopen(filename, mode)
[fid, message] = fopen(filename, mode, machineformat)
[fid, message] = fopen(filename, mode, machineformat, encoding)
fids = fopen('all')
[filename, mode, machineformat, encoding] = fopen(fid)
Description
fid = fopen(filename) opens the file filename for read access. (On PCs, fopen opens files for binary read access.)
fid is a scalar MATLAB integer, called a file identifier. You use the fid as the first argument to other file input/output routines. If fopen cannot open the file, it returns -1. Two file identifiers are automatically available and need not be opened. They are fid=1 (standard output) and fid=2 (standard error).
简而言之,r表示打开问文件是为了读取数据
fid值表示是否成功
Open file, or obtain information about open files
Syntax
fid = fopen(filename)
fid = fopen(filename, mode)
[fid, message] = fopen(filename, mode, machineformat)
[fid, message] = fopen(filename, mode, machineformat, encoding)
fids = fopen('all')
[filename, mode, machineformat, encoding] = fopen(fid)
Description
fid = fopen(filename) opens the file filename for read access. (On PCs, fopen opens files for binary read access.)
fid is a scalar MATLAB integer, called a file identifier. You use the fid as the first argument to other file input/output routines. If fopen cannot open the file, it returns -1. Two file identifiers are automatically available and need not be opened. They are fid=1 (standard output) and fid=2 (standard error).
简而言之,r表示打开问文件是为了读取数据
fid值表示是否成功
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询