Hi--

I'm trying to figure out how to use RealDistributions to model noise.
For example, I would like to model a signal+noise and tried using this
construct:

T=RealDistribution('gaussian',1)
f(x)=sin(x)+T.get_random_element()
plot(f(x),(x,0,2*pi))

Unfortunately, that only calls get_random_element() once, at the
definition of f(x) and results in a perfect sinusoid offset by a
random value.

How do I write this so that get_random_element() is called each time
f(x) is evaluated?  I would like to see a noisy sinusoid.

Thanks--
 Greg

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

To unsubscribe from this group, send email to 
sage-support+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to