edit.m
来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 77 行
M
77 行
function r=edit(fn1, fn2, fn3)%EDIT Call the selected editor to edit the file.% % EDIT [FNAME] [FNAME] [FNAME] %% If the extension is not specified, .m will be% add to the filename.% EDIT accept until 3 file names but this depends% on the capability of the selected editor.% The default Editor is emacs.% You can use another editor setting the enviromental% variable MATLAB_EDITOR in your .cshrc% % Return 0 is if the command was correctly executed.% Returns a nonzero value in s to indicate failure% of the command.%% See also KEDIT, SETENV (Unix command).%% Claudio 16 August 1994%%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu, mark@alice.uoregon.edu%Editor = getenv('MATLAB_EDITOR');sp=' ';% Set the default editor in case MATLAB_EDITOR is not defined.if isempty(Editor) Editor = 'emacs';endif nargin > 3 error('Too many input arguments.');endif nargin > 0; if isempty(find(fn1 == '.')) fn1=[fn1, '.m']; endelse fn1=[];endif nargin > 1 if isempty(find(fn2 == '.')) fn2=[fn2, '.m']; endelse fn2=[];endif nargin > 2 if isempty(find(fn3 == '.')) fn3=[fn3, '.m']; endelse fn3=[];endfilenames = [fn1,sp,fn2,sp,fn3]; command=[Editor, sp, filenames, sp, '&'];rr=unix(command);if nargout==1 r=rrendreturn
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?