I have a script that calls several other scripts with the 'run' command:
However, I think script2 is executed as soon as script1 has started. This can cause some problems, eg if both scripts have control variables of the same name. What I want is for MATLAB to wait until script1 finishes before running script2. I don't want to make the scripts into functions because I have to run them on their own sometimes.
What would be the best way to do this?