Mercurial > repos > public > sbplib
diff findMfiles.m @ 691:527a7b954f26 feature/quantumTriangles
Merge with default
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 14 Sep 2017 16:00:36 +0200 |
parents | cd571e8ec1fd |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/findMfiles.m Thu Sep 14 16:00:36 2017 +0200 @@ -0,0 +1,14 @@ +% Find all m files reachable from folder d +function files = findMfiles(d) + contents = what(d); + + files = {}; + for i = 1:length(contents.m) + files{end+1} = fullfile(d, contents.m{i}); + end + + for i = 1:length(contents.packages) + packagePath = fullfile(d,['+' contents.packages{i}]); + files = [files, findMfiles(packagePath)]; + end +end \ No newline at end of file