Explanation

When you load data from a file, there might be conflicts with functions on the path, which include MATLAB built-in functions. Consider the following function in which myData.mat contains the variable theta.

function z = myFun
    load myData.mat
    z = theta(1);
end

If there is a function theta on the MATLAB path, the variable theta conflicts with the function theta. To avoid possible conflict, specify the theta variable in the call to load.

function z = myFun
    load myData.mat theta
    z = theta(1);
end

Suggested Action

To avoid conflict with functions on the path, load data from a file using one of these syntaxes.

Best practice is to load only the variables you will use or load the variables into a structure. For more information, see load.