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[*][*]