| MATLAB Function Reference | ![]() |
表示
genpath
genpath directory
p = genpath('directory')
詳細
genpath
は、matlabroot/toolbox の下のすべてのディレクトリをリカーシブに付加することで、型作るパス文字列を出力します。
genpath directory
は、directory の下のすべてのディレクトリをリカーシブに付加することで、型作るパス文字列を出力します。
p = genpath('directory')
は、パス文字列を変数 p に出力します。
例題
つぎのコマンドをもつ matlabroot\toolbox\images とすべてのディレクトリを含むパスを出力します。
p = genpath(fullfile(matlabroot,'toolbox','images'))
matlabroot\toolbox\images;matlabroot\toolbox\images\images; matlabroot\toolbox\images\images\ja;matlabroot\toolbox\images\ imdemos;matlabroot\toolbox\images\imdemos\ja;
参考
| gco | get | ![]() |