[pstricks] adding noise to a signal

Doug Mounce mounce at u.washington.edu
Thu Oct 7 15:02:39 CEST 2004


Sorry to be dense.  I am interested in this realization, but is one of my 
packages out of date if I get this error... ?

\input
             pst-key
can't find file .tex

Doug Mounce, Manager, UW MRFM Program, 206.543.1720

On Thu, 7 Oct 2004, Herbert Voss wrote:

> jmpapy wrote:
>
>> does anybody knows how to generate a realization of a normally distributed 
>> random variable b(n) and to add it to an existing discrete-time signal s(n) 
>> drawn using pstricks ?
>
> something like this??
>
> Herbert
>
> \documentclass[a4paper,10pt]{article}
> \usepackage{pstricks,pstricks-add}
> \begin{document}
>
> \pstVerb{
>  rrand srand % initializes the random generator
> }
> \begin{pspicture}(-5,-0.2)(5,5)
> \psline{-}(-5,0)(5,0)
> \psplot[linecolor=red,plotpoints=50,showpoints=true,linestyle=none]{-1}{3}{%
>  4.7 39.48 x 1 neg add 2 exp mul 1 2 exp add div
>  rand          % a random integer 0...2^31 - 1
>  2147483647    % 2^31 - 1
>  div add       % now rand is between 0...1
> }
> \end{pspicture}
>
> \vspace{1cm}
> \begin{pspicture}(-5,-0.2)(5,5)
> \psline{-}(-5,0)(5,0)
> \psplot[linecolor=red,plotpoints=50,showpoints=true,linestyle=none]{-1}{3}{%
>  4.7 39.48 x 1 neg add 2 exp mul 1 2 exp add div
>  rand 2147483647 div add %
> }
> \end{pspicture}
>
> \end{document}
>
>
>
> -- 
> http://TeXnik.de/
> http://PSTricks.de/
> ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
> http://www.dante.de/faq/de-tex-faq/
> http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>




More information about the PSTricks mailing list