赞
踩
原始数据如下:第一列为序号,第二列是主频值,第三列是振幅值。
import matplotlib.pyplot as plt import pandas as pd import numpy as np import datetime x = [] y = [] z = [] N = 13736 def file_path(): read_path = r'G:\testdatasets\1_weidatachuli\xuhao+KHz+zhenfu.txt' file_name = 'xuhao+KHz+zhenfu.txt' return read_path,file_name def process_data(): data_num = [line.strip().split('\t') for line in open(file_name)] for d1,d2,d3 in data_num: x.append(int(d1)) y.append(float(d2)) z.append(float(d3)) # #进行排序 # y.sort() #此时的y已经按照从下到大排好顺序 # #print(y) #进行分类 number_50 = 0 number_50_150
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。