what
R2026bList MATLAB files in folder
Description
what lists the path for the current folder and all the MATLAB® relevant files and folders in the current folder. Such files and
folders include MATLAB program files (.m and .mlx), MAT
files, Simulink® model files (.mdl and .slx), MEX
files, MATLAB app files (.mlapp), and P-code files, as well as
all class and namespace folders.
what lists path, file, and folder
information for folderNamefolderName. You do not need to specify the
@ or + symbol for class and namespace
folders. For example, what table lists the MATLAB files and folders in
toolbox/matlab/datatypes/@table.
Examples
Input Arguments
Output Arguments
Tips
Several MATLAB functions provide different resource-lookup capabilities. Choose the function that matches the type of resource you want to find:
To resolve paths of files and folders that exist on disk, including relative paths that contain
./or../segments, useresolveFilePath.To find static methods, functions that include namespaces or built-in functions, use
which.To list files in a folder, namespace folder, or class folder, use
what.
Extended Capabilities
Version History
Introduced before R2006a