You are on page 1of 3

# Zgomot gaussian

N ≔ 1000

⎡ −0.306 ⎤
⎢ −0.917 ⎥
⎢ 0.905 ⎥
gaussn (6) = ⎢
0.745 ⎥
⎢ 2.906 ⎥
⎢ ⎥
⎣ 1.019 ⎦

zg ≔ gaussn (N)

n ≔ 0 ‥ last (zg)

3.6

2.4

1.8

1.2

0.6

0
0 100 200 300 400 500 600 700 800 900 1⋅10³ zg
-0.6 n

-1.2

-1.8

-2.4

-3

-3.6

12
NumChannels ≔ 1 a≔ ‾‾
2
SampleRate ≔ 44100
Resolution ≔ 16

τf ≔ 0.25

NumPoints ≔ SampleRate ⋅ τf
τf
Δτ ≔ ――――
NumPoints
i ≔ 1 ‥ NumPoints + 1

τ ≔ Δτ ⋅ i
i

Amplitude ≔ 10000

f1 ≔ 440
―――――――――→
signal ≔ ⎛⎝Amplitude ⋅ ⎛⎝sin ⎛⎝2 ⋅ ⋅ f1 ⋅ τ⎞⎠⎞⎠⎞⎠

trunc ⎛10 ⋅ zg ⎞
⎝ 0⎠
f2 ≔ f1 ⋅ a

―――――――――→
signal ≔ stack ⎛⎝signal , ⎛⎝Amplitude ⋅ ⎛⎝sin ⎛⎝2 ⋅ ⋅ f2 ⋅ τ⎞⎠⎞⎠⎞⎠⎞⎠

## S ≔ ‖ for i ∊ 1 ‥ last (zg) ||

‖ ‖ ||
‖ ‖ k ← trunc (10 ⋅ zg )
i ||
‖ ‖ k ||
‖ ‖ fi ← f1 ⋅ a ||
‖ ‖ ⎛ ― ― ― ― ― ― ― ― ― → ⎞||
‖ ‖ signal ← stack ⎝signal , ⎛⎝Amplitude ⋅ ⎛⎝sin ⎛⎝2 ⋅ ⋅ fi ⋅ τ⎞⎠⎞⎠⎞⎠⎠ |
‖ ‖ ||
‖ return signal |

7
length (S) = 1.102 ⋅ 10

## rezultat ≔ WRITEWAV (“D:\\Random5.wav” , SampleRate , Resolution , S)

Densitatea de distribuție:

Q ≔ 20
q≔0‥Q−1
nslots ≔ Q
7
slots ≔ −3.5 + q ⋅ ―――
q nslots

slots ≔ 3.5
nslots

## pd ≔ hist (slots , zg)

150

135

120

105

90

75
pd
q
60

45

30

15

0
0 2 4 6 8 10 12 14 16 18 20