I would prefer to recursively add directories to the path using an option to ADDPATH, such as:
addpath('C:\Foo', 'subdirectories');
instead of using the GENPATH function:
addpath(genpath('C:\Foo'));
addpathgenpathMATLAB
addpath('C:\Foo', 'subdirectories');
addpath(genpath('C:\Foo'));
Best Answer