MATLAB: Loading a dataset (S=load(‘file_name’), how

load dataset renameMATLAB

I have a 512*513 matlab dataset, saved as "file_name.mat". If I use load('file_name'), I can have the dataset loaded as 'data'. But I want it to be named as "S", and tried to use S=load('file_name'), but "S" has the structure informations only.
How can I load 'file_name' in 'S'? thanks!

Best Answer

Once you loaded,
S=data;
clear data;