data = scipy.io.loadmat('test.mat')
"data" now contains a dictionary with keys corresponding to the variable names saved in the original .mat file. The variables are in array format. Saving to .mat files is equally simple. Just create a dictionary with all variables you want to save and use savemat().
data = {} data['x'] = x scipy.io.savemat('test.mat',data)
This saves the array x so that it has the name "x" when read into Matlab. More information on scipy.io can be found in the online documentation.
0 comments:
Post a Comment