MATLAB: How to find the location of a file

directoryfindlocationpath

Hello, I need to be able to find the location of a an m.file and its full path (directory) by typing its name in the command window or programmatically. Is there any function that can do that? Thanks!

Best Answer

The which() command will do that.