如何获取DST类型2转换的频点

这是在正弦信号上使用DST-II的简单代码 如何在水平轴上以Hz为单位绘制正确的频率值? 感谢您的帮助。

    from scipy.fft import fftfreq,dct,dst,idct,idst
    import matplotlib.pyplot as plt 
    tmin=0.
    tmax=5.
    Ns = 16384
    fs = (tmax-tmin)/Ns
    ts = np.linspace(tmin,tmax,Ns,endpoint=False)
    f=10
    xs=np.sin(2.*np.pi*f * ts)
    hatx = dst(xts,type=2,norm='ortho')
    plt.plot(np.abs(hatx)**2,label="sans bruit",c='b',lw=0.5)
    plt.xscale('log')
    plt.yscale('log')
qiuyue00 回答:如何获取DST类型2转换的频点

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2588839.html

大家都在问