Mercurial > hg > ltpda
comparison m-toolbox/test/test_ao_gapfillingoptim.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 % Model and generation | |
2 | |
3 | |
4 | |
5 fs = 1; | |
6 | |
7 p1 = pzmodel(1e-8,[pz(1e-3) pz(0.1, 4)],... | |
8 [ pz(2e-1) pz(3e-1)]); | |
9 | |
10 pl3 = plist(); | |
11 pl3 = append(pl3, param('pzmodel', p1)); | |
12 pl3 = append(pl3, param('fs',fs)); | |
13 pl3 = append(pl3, param('nsecs', 3e3)); | |
14 | |
15 a = ao(pl3); | |
16 %% psd | |
17 | |
18 pl = plist(... | |
19 'Scale','ASD',... | |
20 ... 'Win', getappdata(0, 'ltpda_default_spectral_window'), ... | |
21 'Nfft', 1000,... | |
22 'Order', 1); | |
23 | |
24 % pl = plist('Kdes', 100,... | |
25 % 'Jdes', 100000, ... | |
26 % 'Order', 1, ... | |
27 % 'Scale', 'ASD'); | |
28 | |
29 ca = psd(a,pl); | |
30 | |
31 %% plot | |
32 | |
33 rp1 = resp(p1,plist('f1',1e-3,'f2',100,'nf',1000)); | |
34 | |
35 iplot(rp1,ca) | |
36 | |
37 %% gaps | |
38 by = mod((1:length(a.data.y))/10, 20)>19; | |
39 b = ao(tsdata(double(~by), 10)); | |
40 c = a.*b.'; | |
41 | |
42 | |
43 %% | |
44 d = c.gapfillingoptim(c, p1); | |
45 %% | |
46 iplot(psd(a, pl), psd(c, pl), psd(d, pl), resp(p1)) | |
47 iplot(a,c,d) | |
48 | |
49 |