Stationary Gaussian Random Fields
Below is code to generate stationary Gaussian random fields (GRF) on an interval or a rectangle in Matlab.
(These notes and examples were made during Canada/USA Mathcamp 2008.)
- grf-archive.zip Everything below as an archive
- ft_summary.pdf Brief summary of the Fourier transform and how to generate stationary GRFs in one and two dimensions in Matlab.
- grf_example.m Example of how to use grf1.m to generate a stationary 1-dimensional GRF
- grf_example_allinone.m Shows how to generate a 1-dimensional GRF using sines and cosines. All helper functions are included in this file, so it runs on its own. It is not as efficient as using grf1.m but will be fine for many purposes.
- grf1.m generate a stationary GRF in 1 dimension
- grf2.m generate a stationary GRF in 2 dimensions
- ftrans1d.m example of how to perform a Fourier transform in 1-dimension
- k_of_x.m transforms Fourier variable to original variable
- x_of_k.m transforms original variable to Fourier variable
- mhfft.m Fourier transform of a function
- mhifft.m Inverse Fourier transform
- mhfft2.m Fourier transform of a function of 2 variables
- mhifft2.m Inverse Fourier transform in 2 variables