openfile.m
来自「M2HTML by itself generates an HTML docum」· M 代码 · 共 20 行
M
20 行
function fid = openfile(filename,permission)%Open a file in read/write mode, catching errors% FID = OPENFILE(FILENAME,PERMISSION) opens file FILENAME% in PERMISSION mode ('r' or 'w') and return a file identifier FID.% Copyright (C) 2003 Guillaume Flandin <Guillaume@artefact.tk>% $Revision: 1.0 $Date: 2003/29/04 17:33:43 $[fid, errmsg] = fopen(filename,permission);if ~isempty(errmsg) switch permission case 'r' error(sprintf('Cannot open %s in read mode.',filename)); case 'w' error(sprintf('Cannot open %s in write mode.',filename)); otherwise error(errmsg); endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?