Mercurial > hg > ltpda
comparison m-toolbox/test/test_ltpda_pwelch.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 the LTPDA wrapping of pwelch. | |
2 % | |
3 % M Hewitson | |
4 % | |
5 % 07-02-07 | |
6 % | |
7 % $Id: test_ltpda_pwelch.m,v 1.29 2009/02/02 15:20:39 hewitson Exp $ | |
8 % | |
9 function test_ltpda_pwelch() | |
10 | |
11 | |
12 % Make test AOs | |
13 | |
14 nsecs = 10; | |
15 fs = 1000; | |
16 | |
17 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', '(t.^2 - (t.^3)/10) + sin(2*pi*7.433*t) + randn(size(t))'); | |
18 | |
19 a1 = ao(pl); | |
20 a2 = ao(pl); | |
21 | |
22 % Make PSDs | |
23 a3 = psd(a1); | |
24 a4 = psd(a2); | |
25 iplot(a3, a4) | |
26 | |
27 | |
28 % Divide and plot history | |
29 a5 = a3./a4; | |
30 iplot(a5) | |
31 | |
32 plot(a5.hist) | |
33 | |
34 % Reproduce from history | |
35 a_out = rebuild(a5); | |
36 | |
37 iplot(a_out) | |
38 plot(a_out.hist) | |
39 | |
40 end |