5.0

5.0 | 7 ratings Rate this file 60 downloads (last 30 days) File Size: 2.63 KB File ID: #5091

Generate spatial data

by Jon Yearsley

 

03 Jun 2004 (Updated 03 Oct 2005)

No BSD License  

Generate 1/f noise spatial data.

Download Now | 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
spatial data Jon Yearsley 22 Oct 2008 07:21:47
autocorrelation Jon Yearsley 22 Oct 2008 07:21:47
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com