comparison m-toolbox/test/test_ao_select.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_AO_SELECT test the select function of AO class.
2 %
3 % M Hewitson 14-05-07
4 %
5 % $Id: test_ao_select.m,v 1.11 2009/02/02 15:20:38 hewitson Exp $
6 %
7 function test_ao_select()
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 % Select Times
22 pl = plist('Markers', {'', 'o'}, 'LineStyles', {'', 'None'});
23 a1s = select(a1, [10:100], [4 5 6], plist('samples', [2000:40:2300]));
24 iplot([a1 a1s], pl);
25
26 % Select Frequencies
27 iplot(a1xx)
28 a1xxs = select(a1xx, [1 2 3], [4 5 6], plist('samples', [7 8 9]));
29
30 iplot([a1xx a1xxs], pl);
31
32 end
33 % END