DSP筆記3_使用matplotlib練習繪製連續時間訊號子圖做訊號不同頻率比較

 




測試程式

import numpy as np
import matplotlib.pyplot as plt

t = np.arange(0,1,0.01)
xt1 = np.cos(2*np.pi*3*t)
xt2 = np.cos(2*np.pi*5*t)
xt3 = np.cos(2*np.pi*7*t)
xt4 = np.cos(2*np.pi*9*t)
#subplot(row,column,繪製圖表個數)
plt.subplot(4,1,1)
plt.plot(t,xt1)
plt.subplot(4,1,2)
plt.plot(t,xt2)
plt.subplot(4,1,3)
plt.plot(t,xt3)
plt.subplot(4,1,4)
plt.plot(t,xt4)
plt.show()







留言

這個網誌中的熱門文章

何謂淨重(Net Weight)、皮重(Tare Weight)與毛重(Gross Weight)

外貿Payment Term 付款條件(方式)常見的英文縮寫與定義

鼎新ERP_會計系統_總帳管理_財務參數設定_傳票處理