Explanation

The code uses a load function within a parfor loop to load variables. However, to classify variables correctly, the body of the parfor loop must be transparent. Transparency means that all references to variables must be visible in the text of the code. If a load function inside a parfor loop does not assign the MAT-file data to a MATLAB structure, variables that are not visible in the text of code might be loaded into the workspace.

For information on loading MAT-file data into a structure, see the help for load. For information on transparency, see Transparency.


Suggested Action

Call load as a function, assigning the output argument to a variable. For example:

x = load('myfile.mat')