View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
fftnoise - generate noise with a specified power spectrum

5.0 | 2 ratings Rate this file 7 Downloads (last 30 days) File Size: 1.65 KB File ID: #32111 Version: 1.0
image thumbnail

fftnoise - generate noise with a specified power spectrum


Aslak Grinsted (view profile)


Useful helper function for Monte Carlo null-hypothesis tests and confidence interval estimation.

| Watch this File

File Information

USAGE: noise=fftnoise(f[,Nseries])

  f: the fft of a time series (must be a column vector)
  Nseries: number of noise series to generate. (default=1)
  noise: surrogate series with same power spectrum as f. (each column is a surrogate).

  ------ Example: ------
  %calculate if the trend is significantly different from zero
  %(Null-hypothesis: a random process with the same power spectrum as data).
  for ii=1:size(psur,2)
  ptile=prctile(psur(1,:)',[2.5 97.5])
  if (pdata(1)>ptile(2))|(pdata(1)<ptile(1))
    disp('significant trend')
    disp('not significant trend')

MATLAB release MATLAB 6.0 (R12)
Other requirements [ statistics toolbox (prctile.m) is necessary for the listed example ]
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
23 Jun 2016 eric ferguson

simple, effective function

08 Aug 2014 Zachary Danziger

Useful and quick.

Contact us