Mercurial > repos > public > sbplib
changeset 456:cf313abea04b feature/grids
Merge
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 12 May 2017 16:20:43 +0200 |
parents | d5bce13ece23 (current diff) cd571e8ec1fd (diff) |
children | 8ba675cc8827 |
files | |
diffstat | 3 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/checkAllCode.m Fri May 12 16:20:43 2017 +0200 @@ -0,0 +1,6 @@ +% Run matlabs checkcode on all files in current folder including subfolders +function checkAllCode(d) + default_arg('d','') + files = findMfiles(d); + checkcode(files) +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/findMfiles.m Fri May 12 16:20:43 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