MATLAB: Mat file loading problem with matlab2015b

.mat fileloadMATLABmatrix

I recently started using Matlab2015b and i have a problem with loading mat files. I get the error "Index exceeds matrix dimensions", though i have been using the same mat files since a year or two for the simulation environment. The loading works if i clear all other workspace variables or if i use import function. But it doesnt work if i drag drop or use load function from script. i would like to have a solution besides clearing workspace variable everytime i want to load a mat file.

Best Answer

You have created a variable named load, and you are attempting to index into it. Next time this error occurs, run these commands and tell us exactly what is printed:
which load -all
whos load