adding noise to a signal in python

前端 未结 7 725
你的背包
你的背包 2020-12-12 09:55

I want to add some random noise to some 100 bin signal that I am simulating in Python - to make it more realistic.

On a basic level, my first thought was to go bin b

7条回答
  •  Happy的楠姐
    2020-12-12 10:41

    ... And for those who - like me - are very early in their numpy learning curve,

    import numpy as np
    pure = np.linspace(-1, 1, 100)
    noise = np.random.normal(0, 1, 100)
    signal = pure + noise
    

提交回复
热议问题