Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy random sin

import matplotlib.pyplot as pl
import numpy as np

x = np.linspace(1, 10)

def f(x):
    return np.sin(x) + np.random.normal(scale=0.1, size=len(x))

pl.plot(x, f(x))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #random #sin
ADD COMMENT
Topic
Name
5+9 =