comparison m-toolbox/test/test_ao_split_frequency.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 splitting a frequency-series AO by frequency using the split method.
2 %
3 % M Hewitson 02-03-07
4 %
5 % $Id: test_ao_split_frequency.m,v 1.12 2009/02/02 15:20:37 hewitson Exp $
6 %
7 function test_ao_split_frequency()
8
9 % Make test AOs
10
11 nsecs = 10;
12 fs = 1000;
13
14 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*7.433*t) + randn(size(t))');
15
16 a1 = ao(pl);
17
18 % Make spectrum
19 a1xx = psd(a1);
20
21 % Split by frequency
22 freqs = [10 100];
23 pl = plist('frequencies', freqs);
24 b = split(a1xx, pl);
25
26
27 % Plot
28 iplot(a1xx, b)
29 plot(b.hist)
30
31
32 % Recreate from history
33 a_out = rebuild(b);
34
35 iplot(a_out)
36 plot(a_out.hist)
37
38 end
39
40 % END