Reputation: 147
I wanted to load a file 'data_MC_temp.mat' into a variable 'data_MC'. I tried using following command: load('data_MC_temp.mat', 'data_MC');
But, MATLAB neither loads file into 'data_MC' variable nor gives any error or warning. Is there anything wrong with the syntax? Please help me and suggest proper way of doing it.
Upvotes: 0
Views: 191
Reputation: 3330
To load a file into a variable do like this:
data_MC = load('data_MC_temp.mat');
The syntax you used is only used if there is a variable insde the file data_MC_temp.mat
called data_MC
and you only want to load that specific variable.
Upvotes: 4