【发布时间】:2018-03-21 14:38:16
【问题描述】:
我正在网上冲浪以查找与 MATLAB 的函数 pulsint 等效的 Python,但到目前为止我还没有找到任何与它非常接近的东西。
在这方面的任何提示都会非常有帮助!
【问题讨论】:
标签: python-3.x matlab signal-processing
我正在网上冲浪以查找与 MATLAB 的函数 pulsint 等效的 Python,但到目前为止我还没有找到任何与它非常接近的东西。
在这方面的任何提示都会非常有帮助!
【问题讨论】:
标签: python-3.x matlab signal-processing
您可以轻松创建自己的 pulsint 函数。
脉冲公式:
你需要 numpy 库来保持简单
import numpy as np
import matplotlib as mpl
# Non coherent integration
def pulsint(x):
return np.sqrt(np.sum(np.power(np.absolute(x),2),0))
npulse = 10;
# Random data (100x10 vector)
x = np.matlib.repmat(np.sin(2*np.pi*np.arange(0,100)/100),npulse,1)+0.1*np.random.randn(npulse,100)
# Plot the result
mpl.pyplot.plot(pulsint(x))
mpl.pyplot.ylabel('Magnitude')
【讨论】: