0

如果我有如下功能:

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

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

4

1 回答 1

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]
于 2018-11-20T23:26:23.140 回答