| MATLAB Function Reference | ![]() |
Graphical
Interface
另外可使用現行目錄瀏覽器( Current Directory browser)取代 what 指令. 要開啟它, 在MATLAB桌面的View目錄中選擇 Current Directory.
Syntax
what
what dirname
s = what('dirname')
Description
what 會列出M,
MAT, MEX, MDL, 和 P- 檔
還有目前工作目錄所屬的類別目錄.
what dirname 列出在 MATLAB
搜尋路徑上, dirname目錄中的檔案. 而且你不用輸入目錄完整的檔案路徑. 只要最後一個, 或是最後兩個, 就足夠了.
使用 what class 去列出在
@class裡方法目錄的檔案. 舉例來說, what cfit 列出
MATLAB 中在 toolbox\curvefit\curvefit\@cfit的檔案.
s = what('dirname') 以下列的值域用結構陣列的方式傳回結果.
| Field |
Description |
path |
目錄的路徑 |
m |
*.m的異質陣列 |
mat |
*.mat的異質陣列 |
mex |
*.mex的異質陣列 |
mdl |
*.mdl的異質陣列 |
p |
*.p的異質陣列 |
classes |
類別名稱的異質陣列 |
Examples
what audio 目錄 matlabroot\toolbox\matlab\audio 裡的.m 檔案 Contents lin2mu sound wavread auread mu2lin soundsc wavrecord auwrite saxis wavplay wavwrite 目錄 matlabroot\toolbox\matlab\audio 裡的.MAT 檔案 chirp handel splat gong laughter train
要得到在 toolbox\ matlab\general包括 MATLAB
檔案名稱的結構陣列, 鍵入
s = what('general')
s =
path: 'matlabroot:\toolbox\matlab\general'
m: {105x1 cell}
mat: {0x1 cell}
mex: {5x1 cell}
mdl: {0x1 cell}
p: {'helpwin.p'}
classes: {'char'}
See
Also
dir,
exist,
lookfor, path,
which,
who
|
weekday | whatsnew | ![]() |