【发布时间】:2018-12-02 23:53:16
【问题描述】:
我想绘制一个三角波,其振幅以伏特 A=1V 为单位,频率为 1Hz。
我的代码如下:
from scipy import signal
>>> import matplotlib.pyplot as plt
>>> t = np.linspace(0, 4, 100)
>>> plt.plot(t,1* signal.sawtooth(2 * np.pi * 1 * t,0.5))
plt.xlabel("Time[s]")
plt.ylabel("Amplitude[V]")
plt.title("Singal for sampling")
但我得到的输出是这样的:
为什么不是像这样的完美三角波? (我需要更改代码中的某些内容吗?
我想要的输出
【问题讨论】: