x=np.loadtxt(open("D:\\二向反射实验\\数据\\s1-15.txt"),delimiter=",", skiprows=0)
print(x.shape)
# x=pd.read_csv("D:\\二向反射实验\\数据\\s1-15.txt",sep=',',header=None)
# print(x)
# with open("D:\\二向反射实验\\数据\\s1-15.txt","r") as fp:
# x=fp.read()
# print(x)


MATLAB 

angle = data(:,1:3);
real = data(:,80);

 

Python

x[:,3]

MATLAB与Python切片是一样的,都是data[*:*,*:*],MATLAB是小括号

单独元素,MATLAB是data(*,*),Python可以使data[*][*]

posted on 2019-01-24 10:12  在路上_ZY  阅读(271)  评论(0编辑  收藏  举报