首页 > 其他分享 >时域转频域

时域转频域

时间:2022-12-01 13:45:42浏览次数:35  
标签:plt df feature 频域 240 np import 时域

import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch import numpy as np df = pd.read_csv('train.csv') df=df.drop(['ID'],axis=1) nmp=df.to_numpy() feature=nmp[:,:-1] label=nmp[:,-1]#(210,240) feature=np.fft.fft(feature) feature=np.abs(feature)/240*2 ax1 = plt.subplot(2,1,1) for i in range(240):     if label[i]==0:         plt.plot(range(240),feature[i,:],color='red')     if label[i]==1:         plt.plot(range(240),feature[i,:],color='blue')           plt.show() print(1)

标签:plt,df,feature,频域,240,np,import,时域
From: https://www.cnblogs.com/hahaah/p/16941139.html

相关文章