No BSD License  

Highlights from
Generate spatial data

5.0

5.0 | 7 ratings Rate this file 34 Downloads (last 30 days) File Size: 2.63 KB File ID: #5091
image thumbnail

Generate spatial data

by Jon Yearsley

 

03 Jun 2004 (Updated 03 Oct 2005)

Generate 1/f noise spatial data.

| Watch this File

File Information
Description

The script generates spatial data with a scale-invariant power spectrum (1/f noise) and a normal error distribution.

The spectral density of the data is proportional to f^BETA, where f is the frequency and BETA is the spectral exponent (BETA=0 is white noise, BETA=-2 is Brown noise).

To generate Brown noise on a 10x10 grid you type

spatialPattern([10,10],-2)

which gives a 10x10 matrix containihng the data.

1/f noise is not stationary, and so doesn't have a well defined variance. A variogram of the data show variance linearly increasing with increasing lag.

Time series data can also be generated. For example, a pink noise time series of lenth 1000 is produced by

spatialPattern([1000,1],-1)

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
21 Jun 2005 Gomez Lopez  
28 Jul 2005 Madhukar U S

Its of great use.

02 Mar 2006 Stanley Bileschi

fantastic, works just like you want it to. It's a quick edit to make the default parameters a bit more user friendly, like so that Dim can be one number, and that automatically BETA sets to -2, for 1/f noise

14 Mar 2006 Md Nurujjaman  
16 Jun 2006 Terence Picton

fine program - easy to use for pink noise for auditory purposes, haven't tried the spatial noises.

06 Oct 2007 Yuval Cohen

I use it for audio noise generation. It works great. It would be beneficial to eliminate non-audible components (below 20Hz) in order to improve the power density of the signal.

15 Jul 2009 Gabriel Akira Schreiber

Great, thank you very much.

Please login to add a comment or rating.
Updates
03 Oct 2005

The original script defined beta to be a factor of two different from standard value. This has now been corrected.

Tag Activity for this File
Tag Applied By Date/Time
statistics Jon Yearsley 22 Oct 2008 07:21:47
probability Jon Yearsley 22 Oct 2008 07:21:47
1f noise Jon Yearsley 22 Oct 2008 07:21:47
autocorrelation Jon Yearsley 22 Oct 2008 07:21:47
spatial data Jon Yearsley 22 Oct 2008 07:21:47
1f noise Alexandre 27 Jan 2011 10:00:28

Contact us at files@mathworks.com