About MATLAB parallel computing toolbox and variable types

3月. 22, 2017 by

Today I fixed the license problem of Parallel Computing Toolbox in MATLAB. By the way, the commands of parfor and spmd are really powerful. However, there is a new problem about my global variables. I use the global variable for the transmission of my parameters of model among different functions. (so many parameters in different functions and I need to adjust them time to time, so it is more convenient to use the global variable.) But the paforr-loop doesn't accept the globle variables. Because at the beginning of every parfor-loop, the variables in the workspace will be cleared. Moreover, the data among different workers of the parallel computing can not be shared and transferred. This is really a big trouble for me at present.