Browse code

SPM2 compatibilität begonnen

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@193 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on20/05/2009 16:17:09
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+function fileList = getFilteredFileList(directory,filterpattern,fullpath)
2
+if nargin < 3
3
+    fullpath = 1;
4
+end
5
+files = dir(directory);
6
+fileList = [];
7
+
8
+for f = 1:numel(files)
9
+    if files(f).isdir
10
+        continue
11
+    end
12
+    if regexp(files(f).name,filterpattern,'once')
13
+        if fullpath
14
+            fileList = strvcat(fileList, fullfile(directory,files(f).name));
15
+        else
16
+            fileList = strvcat(fileList, files(f).name);
17
+        end
18
+    end
19
+end
20
+end
0 21
\ No newline at end of file