python傅里叶逆变换_Python傅里叶逆变换

问题

我试图从一组从音频文件中获取的数据中删除一个频率。在

为了简化我的问题,我创建了下面的代码,它创建了一组wave并将它们合并到一个复杂的wave中。然后求出复波的傅里叶变换并求逆。在

我希望看到原始波形的结果,因为应该没有数据丢失,但是我收到了一个非常不同的波形。在

代码:import numpy as np

import matplotlib.pyplot as plt

import random

#Get plots

fig, c1 = plt.subplots()

c2 = c1.twinx()

fs = 100 # sample rate

f_list = [5,10,15,20,100] # the frequency of the signal

x = np.arange(fs) # the points on the x axis for plotting

# compute the value (amplitude) of the sin wave for each sample

wave = []

for f in f_list:

wave.append(list(np.sin(2*np.pi*f * (x/fs))))

#Adds the sine waves together into a single complex wave

wave4 = []

for i in range(len(wave[0])):

data = 0

for ii in range(len(wave)):

data += wave[ii][i]

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值