MATLAB: Does the WHICH command not find MATLAB files within a package directory in MATLAB 7.9 (R2009b)

MATLAB

I have created a package called 'mypackage', which contains 'myfunction1.m' and 'myfunction2.m'. When I navigate to the 'mypackage' directory and execute
which myfunction1
which myfunction2
I receive the following error messages:
'mypackage.myfunction1' not found.
'mypackage.myfunction1' not found.

Best Answer

WHICH does not search through individual MATLAB files within a package directory. To find specific MATLAB files within a package, execute the following:
which mypackage.myfunction1
which mypackage.myfunction2