Files and Folders
MATLAB functions that work with files always accept the full paths to those files as inputs. If you do not specify the full path, then MATLAB looks for files in the current folder first, and then in folders on the search path. To make sure that MATLAB finds the file that you expect, you can construct and pass the full path, change to the appropriate folder, or add the folder to the path. For more information, see Files and Folders that MATLAB Accesses.