comparison m-toolbox/test/test_ao_find.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_FIND test the find function of AO class.
2 %
3 % M Hewitson 14-05-07
4 %
5 % $Id: test_ao_find.m,v 1.10 2009/02/02 15:20:38 hewitson Exp $
6 %
7 function test_ao_find()
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 a1s = find(a1, 'x < 1', 'x > 0.1');
23 a2s = find(a1, 'y > 1');
24
25 [hf, ha, hl] = iplot([a1 a2s]);
26 [hf, ha, hl] = iplot([a1 a1s a2s]);
27 set(hl(2), 'Marker', 'o', 'LineStyle', 'None')
28
29
30 % Select Frequencies
31 a1xxs = select(a1xx, [1 2 3], [4 5 6], plist('samples', [7 8 9]));
32
33 [hf, ha, hl] = iplot([a1xx a1xxs]);
34 set(hl(2), 'Marker', 'o', 'LineStyle', 'None')
35
36 end
37 % END