1、python读取文件.mat文件
import scipy.io as sio
load_fn='name.mat'
load_data=sio.loadmat(load_fn)
DATA=load_data['key_name']
2、对数据进行主成分分析
import matplotlib.pyplot as plt
pca=PCA(n_components=7)
reduced_data=pca.fit_transform(DATA)
x1=reduced_data[:,1]
y1=reduced_data[:,2]
plt.scatter(x1,y1,marker='.')
3、
生成3行1列的零矩阵
zeros_matrix=np.zeros([3,1])
生成3行1列的1矩阵
ones_matrix=np.ones([3,1])