fftnoise - generate noise with a specified power spectrum
USAGE: noise=fftnoise(f[,Nseries])
INPUTS:
f: the fft of a time series (must be a column vector)
Nseries: number of noise series to generate. (default=1)
OUTPUT:
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).
x=(1:100)';
data=smooth(randn(size(x)),15);
pdata=polyfit(x,data,1)
f=fft(data);
psur=nan(length(pdata),10000);
for ii=1:size(psur,2)
psur(:,ii)=polyfit(x,fftnoise(f),1)';
end
ptile=prctile(psur(1,:)',[2.5 97.5])
if (pdata(1)>ptile(2))|(pdata(1)<ptile(1))
disp('significant trend')
else
disp('not significant trend')
end
Zitieren als
Aslak Grinsted (2025). fftnoise - generate noise with a specified power spectrum (https://de.mathworks.com/matlabcentral/fileexchange/32111-fftnoise-generate-noise-with-a-specified-power-spectrum), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.0.0 |
