Skip to content

Commit 86f5398

Browse files
author
conggen.chen
committed
add the WhiteNoiseAndColoredNoise
1 parent a4b4c43 commit 86f5398

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import numpy as np
3+
import matplotlib.pyplot as plt
4+
5+
L = 500 #仿真长度
6+
7+
# e(k) = c/d * f(k) f(k)为白色噪声
8+
c = [1, -1.5, 0.7, 0.1] #有色噪声的c
9+
d = [1, 0.5, 0.2] # 有色噪声的d
10+
nd = len(c) - 1 # d的阶次
11+
print("nd :", nd)
12+
nc = len(d) - 1 # c的阶次
13+
print("nc :", nc)
14+
Xwn = np.zeros(nc) # 白色噪声初始值
15+
print("the first of Xwn:", Xwn(0))
16+
Xcn = np.zeros(nd) # 有色初始值
17+
print("the first of Xcn:", Xcn(0))
18+
19+

0 commit comments

Comments
 (0)