1. 먼저 matlab에서 mat 파일을 저장한다.
2. python에서 import scipy.io as spio
로 import를 준다.
3. 불러 올 위치에 FB_mat = spio.loadmat('filterBank.mat')
로 파일을 불러온다.
4. 파일에서 불러올 변수만 새로 뽑아서 array로 사용한다.
aaa = FB_mat['ans']
1. scipy의 scipy.io.savemat을 이용한다.
arr = [x**2 for x in xrange(10)] scipy.io.savemat('file.mat', arr)
Save a dictionary of names and arrays into a MATLAB-style .mat file.
This saves the array objects in the given dictionary to a MATLAB- style .mat file.
scipy.io.savemat
(file_name, mdict, appendmat=True, format='5', long_field_names=False, do_compression=False, oned_as='row')[source]