clear all;
clear;
clc;
a = [1,2,3];
b = [3,4,5];
save('AB.mat','a','b')
clear all;
clear;
clc;
load('AB.mat')
# coding:UTF-8
import scipy.io as scio
dataFile = 'AB.mat'
data = scio.loadmat(dataFile)
print(data.keys())
print(type(data))
print(data['a'])
print(data['b'])
dataNew = 'ANew.mat'
scio.savemat(dataNew, {'A':data['a']})
print(data.keys())
print(type(data))
print(data['a'])
dataNew = 'ABNew.mat'
scio.savemat(dataNew, data)
data = scio.loadmat(dataNew)
print(data.keys())
print(type(data))
print(data['a'])
print(data['b'])