Generate noisy wavelet test data.
Syntax
X = wnoise(NUM,N)
[X,XN] = wnoise(NUM,N,SNRAT)
[X,XN] = wnoise(NUM,N,SNRAT,INIT)
Description
X = wnoise(NUM,N) returns values of test function number NUM, on a 2N sample of [0,1].
[X,XN] = wnoise(NUM,N,SNRAT) returns a test vector X as above, rescaled such that std(x) = SNRAT. The returned vector XN contains the same test vector corrupted by additive Gaussian white noise N(0,1). XN has a signal-to-noise ratio of SNRAT.
[X,XN] = wnoise(NUM,N,SNRAT,INIT) returns previous vector X and XN, but the generator seed is set to INIT value.
The six functions are due to Donoho and Johnstone (See Reference):
NUM = 1
|
Blocks
|
NUM = 2
|
Bumps
|
NUM = 3
|
Heavy sine
|
NUM = 4
|
Doppler
|
NUM = 5
|
Quadchirp
|
NUM = 6
|
Mishmash
|
Examples
% Generate 2^10 samples of 'Heavy sine' (item 3).
x = wnoise(3,10);
% Generate 2^10 samples of 'Doppler' (item 4) and of
% noisy 'Doppler' with a signal-to-noise ratio of 7.
[x,noisyx] = wnoise(4,10,7);
% To introduce your own rand seed, a fourth
% argument is allowed:
init = 2055415866;
[x,noisyx] = wnoise(4,10,7,init);
% Plot all the test functions.
ind = linspace(0,1,2^10);
for i = 1:6
x = wnoise(i,10);
subplot(6,1,i), plot(ind,x)
end

See Also
wden
References
D.L. Donoho, I.M. Johnstone(1994), "Ideal spatial adaptation by wavelet shrinkage," Biometrika, vol 81, pp. 425-455.
[ Previous | Help Desk | Next ]