MATLAB: I can’t load .mat file in the .m file that guide has created

out of scope

Why I can't load .mat file in the .m file that guide has created?. I have saved an array D as
save('dict.mat','D')
But I can't load it even to the workspace. When I'm loading the value of D is changing only. When I type
load dict.mat
It is not seen in workspace

Best Answer

load() loads into the current workspace. In your code, it is loading in the workspace of the function that has the load() command.
Related Question