I'm using MatLab Parallel Computing Toolbox on several computers in my office: I've enstabilished a cluster managed by a custom scheduler (the MatLab's own kind: the MJS).
Everything seems to run smoothly as long as I run scripts and functions that have the same path on every PC (e.g. C:\Sample.m), but unfortunately I need to access to functions that are in the Dropbox folder of every computer (for example the file C:\Users\myusername\Dropbox\Sample.m).
To solve the problem, I tried something like this:
parfor j=1:100
myusername=getenv('username');
cd(['C:\Users\',myusername,'\Dropbox'])
Sample(1,2,3);
end
But with this code the cd function set the current folder in C:\Users\SYSTEM\Dropbox and obviously it can't find Sample.m in it.
Has anybody any way around this problem?