MATLAB: How to find the path of one file knowing only filename

How can I find the path of one file knowing only filename?

Best Answer

If its in one of the matlab path
fileparts(which(filename))