This pipeline with three processes will lead always to the same result if the same input is used.
Thus, the difference between executions may be in your custom code.
The who
function returns the variables in the current active workspace in alphabetic order, but there is not way to ensure that sublist{1}
is always the same variable. The same happens in the FOR loop over sublist
maybe your variables in your workspace are different between runs.
Also, structures S1
and M1
are not described in your code, so it is not possible to us to figure out what is going on with the script. I suggest you to carefully check your code. As advise, avoid using eval
: https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html