矩形窗函数汉宁窗函数汉明窗函数代码
矩形窗函数:
import numpy as np
def rectangular_window(length):
return np.ones(length)
汉宁窗函数:
import numpy as np
def hanning_window(length):
return 0.5 * (1 - np.cos(2 * np.pi * np.arange(length) / (length - 1)))
汉明窗函数:
import numpy as np
def hamming_window(length, alpha=0.54):
return alpha - (1 - alpha) * np.cos(2 * np.pi * np.arange(length) / (length - 1))
原文地址: https://www.cveoy.top/t/topic/b975 著作权归作者所有。请勿转载和采集!