MATLAB: Mex folder with all elements

MATLABmexmex compiler

Hi everyone, and sorry for my English. I am trying to mex some files and my problem is that I have different file in diferent folders. I wanto to know if it is possible to say to the mex command where are all the files, but generally. for example I have five different folders which all they are subfolders of other one.
/my documents/home/home.cpp /my documents/job/job.cpp /my documents/garden/garden.cpp
is possible to say that all elements are in /my documents/??? the same question for the includes.
Thanks to all

Best Answer

There are a lot of submissions for recursive directory searching in the FileExchange. See: