comparison m-toolbox/test/test_ltpda_tfe.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_tfe functionality.
2 %
3 % M Hewitson 13-02-07
4 %
5 % $Id: test_ltpda_tfe.m,v 1.22 2009/04/07 17:45:22 ingo Exp $
6 %
7 function test_ltpda_tfe()
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 % Filter one time-series
19
20 % Make a filter
21 f1 = miir(plist('type', 'highpass', 'fc', 20, 'fs', fs));
22
23 % Filter the input data
24 [a2, f1] = filter(a1,plist('filter', f1));
25
26 % Make TF from a1 to a2
27 a4 = tfe(a1,a2, plist('Nfft', 1000));
28
29 % Plot results and history
30 b = a4;
31
32 iplot(b);
33 plot(b.hist);
34
35 % Reproduce from history
36 a_out = rebuild(b);
37
38 iplot(a_out)
39 plot(a_out.hist)
40
41 end