📄 setdef.m
字号:
function setdef(theFunction)% setdef -- Switch to directory of a function.% setdef(theFunction) switches to the directory% that contains theFunction.% setdef (no argument) displays pwd.% Copyright (C) 1996 Dr. Charles R. Denham, ZYDECO.% All Rights Reserved.% Disclosure without written consent from the% copyright owner does not constitute publication.if nargin > 0 w = which(theFunction); f = findstr(w, filesep); if any(f) w = w(1:f(length(f))); eval(['cd(''' w(1:f(length(f))) ''')']) endenddisp([' ## ' pwd])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -