1. 程式人生 > >Matlab中fopen,fscanf的用法總結

Matlab中fopen,fscanf的用法總結

fopen - Open file, or obtain information about open files
    This MATLAB function opens the file, filename, for binary read access, and
    returns an integer file identifier equal to or greater than 3.
    fileID = fopen(filename)
    fileID = fopen(filename,permission)
    fileID = fopen(filename,permission,machinefmt,encodingIn)
    [fileID,errmsg] = fopen(___)
    fIDs = fopen('all')
    filename = fopen(fileID)

    [filename,permission,machinefmt,encodingOut] = fopen(fileID)

fopen開啟檔案,或獲取有關開啟檔案的資訊。

這個MATLAB函式開啟檔案,檔名,用於二進位制讀取訪問,以及。 返回等於或大於3的整數檔案識別符號。
 fileID = fopen(檔名)
 fileID = fopen(檔名,許可)
 fileID = fopen(檔名,許可,machinefmt encodingIn)
 fIDs = fopen('all')
  filename = fopen(fileID)
[filename,permission,machinefmt,encodingOut] = fopen(fileID)