주요 콘텐츠

what

폴더에 있는 MATLAB 파일 나열

설명

what은 현재 폴더의 경로와 현재 폴더에 있는 모든 MATLAB® 관련 파일 및 폴더를 나열합니다. 이러한 파일과 폴더에는 MATLAB 프로그램 파일(.m.mlx), MAT 파일, Simulink® 모델 파일(.mdl.slx), MEX 파일, MATLAB 앱 파일(.mlapp), P 코드 파일뿐만 아니라 모든 클래스 폴더와 네임스페이스 폴더도 포함됩니다.

what folderNamefolderName에 대한 경로, 파일, 폴더 정보를 나열합니다. 클래스와 네임스페이스 폴더에 대해 @ 또는 + 기호를 지정할 필요가 없습니다. 예를 들어, what tabletoolbox/matlab/datatypes/@table에 있는 MATLAB 파일과 폴더를 나열합니다.

예제

s = what(___)은 구조체형 배열로 결과를 반환합니다. 이 구문은 이전 구문의 모든 입력 인수 조합과 함께 사용할 수 있습니다.

예제

예제

모두 축소

graph2d 폴더에 있는 MATLAB 파일과 폴더를 나열합니다. 이 폴더의 위치는 사용자의 설치에 따라 달라집니다.

what graph2d
MATLAB Code files in folder matlabroot\toolbox\matlab\graphics\graphics\graph2d

Contents               doresize               getscribecontextmenu   moveaxis               putdowntext            semilogx               texlabel               
basicfitdatastat       enddrag                getscribeobjectdata    pan                    rbbox                  semilogy               zoom                   
box                    figtoolset             gtext                  plotedit               scribeclearmode        setscribecontextmenu   
doclick                getcolumn              jpropeditutils         plotyy                 scribeeventhandler     setscribeobjectdata    
dokeypress             getobj                 loglog                 polar                  scriberestoresavefcns  sgtitle                
domymenu               getorcreateobj         middrag                prepdrag               scribetextdlg          subplot                

Classes in folder matlabroot\toolbox\matlab\graphics\graphics\graph2d

arrowline     axisobj       editline      fighandle     hgbin         scribehgobj   
axischild     axistext      editrect      figobj        scribehandle  



Namespaces in folder matlabroot\toolbox\matlab\bigdatashared\tall\graph2d

qeTallShared 

MATLAB 파일이 포함되어 있는 Fixed-Point Designer™ 폴더를 찾습니다.

s = what("fixpoint")
s = 

  2×1 struct array with fields:

    path
    m
    mlapp
    mlx
    mat
    mex
    mdl
    slx
    sfx
    p
    classes
    packages

matlabroot\toolbox\fixpoint 폴더에 있는 SLX 파일을 나열합니다.

s(2).slx
ans =

  2×1 cell array

    {'fixpoint129PlusTestToolsLib.slx'}
    {'fxpRangeInputGenerator.slx'     }

입력 인수

모두 축소

폴더의 이름으로, 문자형 벡터 또는 string형 스칼라로 지정됩니다.

로컬 폴더의 경우 폴더의 전체 경로를 지정할 필요가 없습니다. 대신, 상대적 부분 경로를 지정할 수 있습니다. 예를 들어, what strfunwhat matlab/strfun 모두 toolbox/matlab/strfun에 있는 MATLAB 파일을 나열합니다. 그러나 파일이 원격 위치에 있다면 folderName은 URL(Uniform Resource Locator)로 지정된 전체 경로를 포함해야 합니다. 자세한 내용은 원격 데이터로 작업하기 항목을 참조하십시오.

folderName의 대/소문자 구분은 파일 시스템에 의해 결정됩니다. 일반적으로 Windows® 시스템과 Mac 시스템은 대/소문자를 구분하지 않으므로, whatfolderName의 모든 대/소문자 변동에 대한 결과를 반환합니다. 예를 들어, Windows 파일 시스템의 폴더 c:\mycode에 파일 myfile.m이 포함되어 있다고 가정해 보겠습니다. what은 대/소문자를 다르게 지정하더라도 해당 폴더를 성공적으로 찾습니다.

what MYCodE
MATLAB Code files in folder c:\mycode
myfile

일반적으로 대/소문자를 구분하는 Linux® 시스템에서는 what이 결과 0을 반환합니다.

출력 인수

모두 축소

경로, 파일 및 폴더의 목록으로, 다음 필드를 포함하는 구조체형 배열로 반환됩니다.

필드

설명

path

폴더의 전체 경로

m

MATLAB 프로그램 파일 이름으로 구성된 셀형 배열

mlapp

MATLAB 앱 파일 이름으로 구성된 셀형 배열

mlx

MATLAB 라이브 스크립트 파일 이름으로 구성된 셀형 배열

mat

MAT 파일 이름으로 구성된 셀형 배열

mex

MEX 파일 이름으로 구성된 셀형 배열

mdl

MDL 파일 이름으로 구성된 셀형 배열

slx

SLX 파일 이름으로 구성된 셀형 배열

sfx

SFX 파일 이름으로 구성된 셀형 배열

p

P 코드 파일 이름으로 구성된 셀형 배열

classes

클래스 폴더로 구성된 셀형 배열

packages

네임스페이스 폴더로 구성된 셀형 배열

확장 기능

모두 확장

버전 내역

R2006a 이전에 개발됨

참고 항목

| | | | |