Mercurial > hg > ltpda
comparison m-toolbox/test/test_ltpda_ltfe.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_LTFE test the ltpde_ltfe function. | |
2 % | |
3 % M Hewitson 23-05-07 | |
4 % | |
5 % $Id: test_ltpda_ltfe.m,v 1.19 2009/04/07 17:45:22 ingo Exp $ | |
6 % | |
7 function test_ltpda_ltfe() | |
8 | |
9 % Make test AO | |
10 | |
11 nsecs = 10000; | |
12 fs = 10; | |
13 | |
14 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'randn(size(t))'); | |
15 a1 = ao(pl); | |
16 | |
17 | |
18 % Filter one time-series | |
19 | |
20 % Make a filter | |
21 f1 = miir(plist('type', 'highpass', 'fc', 0.1)); | |
22 | |
23 % Filter the input data | |
24 [a2, f1] = filter(a1,plist('filter', f1)); | |
25 | |
26 % Make a filter | |
27 f1 = miir(plist('type', 'lowpass', 'fc', .03)); | |
28 | |
29 % Filter the input data | |
30 [a3, f1] = filter(a1,plist('filter', f1)); | |
31 | |
32 | |
33 % Split data | |
34 pl = plist('times', [10 a1.data.nsecs]); | |
35 aoin = split(a1, pl); | |
36 aoout = split(a2, pl); | |
37 aoout2 = split(a3, pl); | |
38 | |
39 % Make TF from a1 to a2 | |
40 | |
41 pl = plist('Kdes', 1000, 'Kmin', 2, 'Jdes', 1000, 'Order', 1); | |
42 | |
43 % log TF estiamtes | |
44 tfs = ltfe(aoin, aoout, pl); | |
45 | |
46 | |
47 % Plot | |
48 iplot(tfs) | |
49 | |
50 % Recreate from History | |
51 a_out = rebuild(tfs); | |
52 | |
53 iplot(a_out) | |
54 b = a_out; | |
55 plot(b.hist) | |
56 | |
57 end | |
58 | |
59 | |
60 | |
61 % END |