what
폴더에 있는 MATLAB 파일 나열
설명
what
은 현재 폴더의 경로와 현재 폴더에서 검색되는 모든 MATLAB® 관련 파일 및 폴더를 나열합니다. 이것은 MATLAB 프로그램 파일(.m
과 .mlx
), MAT 파일, Simulink® 모델 파일(.mdl
과 .slx
), MEX 파일, MATLAB 앱 파일(.mlapp
), P 파일뿐만 아니라 모든 클래스 폴더와 패키지 폴더도 포함합니다.
what
은 folderName
folderName
에 대한 경로, 파일, 폴더 정보를 나열합니다. 클래스와 패키지 폴더에 대해 @
또는 +
기호를 지정할 필요가 없습니다. 예를 들어, what table
은 toolbox/matlab/datatypes/@table
에 있는 MATLAB 파일과 폴더를 나열합니다.
예제
경로, 파일, 폴더 정보 나열하기
graph2d
폴더에 있는 MATLAB 파일과 폴더를 나열합니다. 이 폴더의 위치는 사용자의 설치에 따라 달라집니다.
what graph2d
MATLAB Code files in folder matlabroot\toolbox\matlab\graph2d Contents figtoolset loglog putdowntext setscribeobjectdata axis getcolumn middrag rbbox sgtitle basicfitdatastat getobj moveaxis scribeclearmode subplot box getorcreateobj pan scribeeventhandler texlabel doclick getscribecontextmenu plot scriberestoresavefcns title dokeypress getscribeobjectdata plotedit scribetextdlg xlabel domymenu grid plotyy semilogx ylabel doresize gtext polar semilogy zoom enddrag jpropeditutils prepdrag setscribecontextmenu P-files in folder matlabroot\toolbox\matlab\graph2d axis sgtitle subplot zoom Classes in folder matlabroot\toolbox\matlab\graph2d arrowline axisobj editline fighandle hgbin scribehgobj axischild axistext editrect figobj scribehandle
툴박스 패키지를 지원하는 파일 찾기
MATLAB 파일이 포함되어 있는 Fixed-Point Designer™ 폴더를 찾습니다.
s = what('fixpoint')
s = struct with fields: path: 'matlabroot\toolbox\fixpoint' m: {4×1 cell} mlapp: {0×1 cell} mlx: {0×1 cell} mat: {0×1 cell} mex: {0×1 cell} mdl: {0×1 cell} slx: {0×1 cell} sfx: {0×1 cell} p: {4×1 cell} classes: {0×1 cell} packages: {5×1 cell}
폴더에 있는 패키지를 나열합니다.matlabroot
\toolbox\fixpoint
s.packages
ans = 5×1 cell array {'DataTypeOptimization' } {'DataTypeWorkflow' } {'FunctionApproximation'} {'IRInstrumentation' } {'cpopt' }
DataTypeWorkflow
패키지를 지원하는 파일을 찾습니다.
s2 = what('DataTypeWorkflow');
s2.p
ans = 6×1 cell array {'DTWRun.p' } {'RangeCollectionMode.p' } {'Result.p' } {'VerificationResult.p' } {'findDecoupledSubsystems.p'} {'hyperlink.p' }
입력 인수
folderName
— 폴더의 이름
문자형 벡터 | string형 스칼라
폴더의 이름으로, 문자형 벡터 또는 string형 스칼라로 지정됩니다.
로컬 폴더의 경우 폴더의 전체 경로를 지정할 필요는 없습니다. 대신, 상대적 부분 경로를 지정할 수 있습니다. 예를 들어, what strfun
과 what matlab/strfun
모두 toolbox/matlab/strfun
에 있는 MATLAB 파일을 나열합니다. 그러나 파일이 원격 위치에 있다면 folderName
은 URL(Uniform Resource Locator)로 지정된 전체 경로를 포함해야 합니다. 자세한 내용은 원격 데이터로 작업하기 항목을 참조하십시오.
folderName
의 대/소문자 구분은 파일 시스템에 의해 결정됩니다. 일반적으로 Windows® 시스템과 Mac 시스템은 대/소문자를 구분하지 않으므로, what
은 folderName
의 모든 대/소문자 변동에 대한 결과를 반환합니다. 예를 들어, 파일 myfile.m
이 포함된 폴더 c:\mycode
가 Windows 파일 시스템에 있다고 가정해 보겠습니다. what
은 잘못된 대/소문자가 지정된 경우에도 해당 폴더를 성공적으로 찾습니다.
what MYCodE
MATLAB Code files in folder c:\mycode myfile
일반적으로 대/소문자를 구분하는 Linux® 시스템에서는 결과 0이 반환됩니다.
출력 인수
s
— 경로, 파일 및 폴더의 목록
구조체형 배열
경로, 파일 및 폴더의 목록으로, 다음 필드를 포함하는 구조체 배열로 반환됩니다.
필드 | 설명 |
---|---|
| 폴더의 전체 경로 |
| MATLAB 프로그램 파일 이름으로 구성된 셀형 배열 |
| MLAPP 파일 이름으로 구성된 셀형 배열 |
mlx | MLX 파일 이름으로 구성된 셀형 배열 |
| MAT 파일 이름으로 구성된 셀형 배열 |
| MEX 파일 이름으로 구성된 셀형 배열 |
| MDL 파일 이름으로 구성된 셀형 배열 |
| SLX 파일 이름으로 구성된 셀형 배열 |
| SFX 파일 이름으로 구성된 셀형 배열 |
| P 파일 이름으로 구성된 셀형 배열 |
| 클래스 폴더로 구성된 셀형 배열 |
| 패키지 폴더로 구성된 셀형 배열 |
확장 기능
스레드 기반 환경
MATLAB®의 backgroundPool
을 사용해 백그라운드에서 코드를 실행하거나 Parallel Computing Toolbox™의 ThreadPool
을 사용해 코드 실행 속도를 높일 수 있습니다.
이 함수는 스레드 기반 환경을 완전히 지원합니다. 자세한 내용은 스레드 기반 환경에서 MATLAB 함수 실행하기 항목을 참조하십시오.
버전 내역
R2006a 이전에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)