?? whichdir.m
字號:
function[dir]=whichdir(name)% WHICHDIR Returns directory name containing file in search path.%% WHICHDIR NAME returns the directory containing a file called NAME,% i.e. the full path of the file excluding NAME and the trailing '/'. %% If more than one directory contains a file called NAME, then % WHICHDIR returns a cell array of directories names.%% If NAME does not include an extension, then it is interpreted as% the name of an m-file, i.e. having extension '.m' .% _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information % (C) 2006 J.M. Lilly --- type 'help jlab_license' for details if isempty(findstr(name,'.')) name=[name '.m'];enddir=which(name,'-all');for i=1:length(dir) dir{i}=dir{i}(1:end-length(name)-1);endif i==1 dir=dir{1};end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -