Stefan, What is meant by 'spatially correlated random variables'? Correlated how? You could make a random image, and then smooth it and the pixels would have nice small scale correlations but that's not what you are asking I expect.
If you define a covariance matrix how you like - you can then diagonalise it with a coordinate transformation (matrix mul) - then generate a random sequence of vectors based on the sigma_i's - then transform back to the original coordinate system and your variables are correlated according to the specified covariance matrix. All these things can be done vectorially and efficiently. Lognormal - well just make a normal distribution and then do 10**x ! hope that helps. If it doesn't try getting some inspiration at the Brewer's Art downtown. :-) Karl On 23/05/2012, at 12:18 PM, Stefan wrote: > Dear All, > > Do you know how to generate spatially correlated random variables with pdl? > Lognormal distribution is preferred, but Gaussian would be acceptable. > > What CPAN modules could be helpful? > > I need to generate random material properties for data points in space (x, > y, z). The properties don't change abruptly, but rather transition smoothly. > In other words, the correlation has a finite radius, d, and then it > disappears. > > Your help will be appreciated. > > Thank you, > > Stefan > > ------------------------------------- > Stefan Szyniszewski, Ph.D.,P.E. > Post-Doctoral Researcher > Civil Engineering Department > The Johns Hopkins University > > Latrobe Hall 109 > 3400 Charles St. > Baltimore, MD 21218-2682 > Phone: 352-328-5434 > Fax: 410-516-7473 > Email: [email protected] > Web: www.szyniszewski.com > > > > > > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
