From 596701a39c1a86bec134ce18c89733a82f4ef567 Mon Sep 17 00:00:00 2001 From: lpuettmann Date: Wed, 9 Dec 2015 15:04:48 +0100 Subject: [PATCH] Close #12: Adjust Matlab path delimiter: Adjust for different path delimiters on different operating systems. --- MATLAB/setup.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MATLAB/setup.m b/MATLAB/setup.m index cd3b3ed..79b9db5 100644 --- a/MATLAB/setup.m +++ b/MATLAB/setup.m @@ -10,7 +10,13 @@ for i=1:length(paths) thisPath = paths{i}; - thisPathSplit = strread(thisPath,'%s','delimiter','/'); + + if isunix + thisPathSplit = strread(thisPath,'%s','delimiter','/'); + elseif ispc + thisPathSplit = strread(thisPath,'%s','delimiter','\\'); + end + addThisPath = 1; % Do not add any directories or files starting with a . or a ~