comparison m-toolbox/test/test_ltpda_nfest.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % TEST_LTPDA_NFEST tests the ltpda_nfest noise-floor estimator.
2 %
3 % M Hewitson 14-05-07
4 %
5 % $Id: test_ltpda_nfest.m,v 1.14 2009/02/02 15:20:37 hewitson Exp $
6 %
7 function test_ltpda_nfest()
8
9
10 nsecs = 10000;
11 fs = 10;
12 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*0.433*t) + 10*sin(2*pi*0.021*t) + randn(size(t))');
13 x12 = ao(pl);
14
15 % Make spectrum
16
17 pl = plist('Nfft', '100*fs');
18 x12xx = psd(x12, pl);
19
20 % Make noise-floor estimate
21 pl = plist('bw', 128);
22 x12nf = smoother(x12xx, pl)
23
24 % Plot
25 iplot([x12xx x12nf])
26
27
28 % Rebuild from history
29 a_out = rebuild(x12nf);
30
31 iplot(a_out)
32 plot(a_out.hist)
33
34 end
35 % END
36