Is this what you want by adding a random number to the values?

> x <- matrix(1:9, ncol=3)
> x
     [,1] [,2] [,3]
[1,]    1    4    7
[2,]    2    5    8
[3,]    3    6    9
> x + runif(9, -.1, .1)
          [,1]     [,2]     [,3]
[1,] 0.9577315 3.927673 6.953332
[2,] 2.0530684 5.072495 8.076258
[3,] 2.9885848 5.987975 8.936416
>



On 1/22/06, Laura Quinn <[EMAIL PROTECTED]> wrote:
>
> I'm wanting to create a series of near-identical matrices via the addition
> of "white noise" to my starting matrix. Is there a function within R which
> will allow me to do this?
>
> Thank you
>
> Laura Quinn
> Institute of Atmospheric Science
> School of Earth and Environment
> University of Leeds
> Leeds
> LS2 9JT
>
> tel: +44 113 343 1596
> fax: +44 113 343 6716
> mail: [EMAIL PROTECTED]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



--
Jim Holtman
Cincinnati, OH
+1 513 247 0281

What the problem you are trying to solve?

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to