Matlab scripts to handle input and output of 3DOT