I solved this by creating a function called "nome":
function [username]=nome()
username='Stefano';
end
I put this function in the matlabroot in every PC on the cluster BUT instead of putting 'Stefano' in each one I put the name of the user in which the Dropbox function is placed. The I had to use cd in the right way:
cdorig=cd;
spmd
cd(matlabroot);
username=nome();
end
spmd
mypath=strsplit(cdorig,'\');
mypath{3}=username;
cd(fullfile(mypath{1:end}));
end
And it works.
