如何离散化信号?

时间:2018-11-20 23:16:42

标签: python signal-processing discretization

如果我有如下功能:

  

G(s)= C /(s-p),其中s = jw,c和p为常数。

此外,可用频率为wa = 100000 rad / s。如何在Python中将∆w = 0.0001wa的信号离散化?

1 个答案:

答案 0 :(得分:1)

使用numpy.arange完成此操作:

import numpy as np

wa = 100000
# np.arange will generate every discrete value given the start, end and the step value
discrete_wa = np.arange(0, wa, 0.0001*wa)

# lets say you have previously defined your function 
g_s = [your_function(value) for value in discrete_wa]