Mercurial > hg > ltpda
comparison m-toolbox/test/test_ao_iplotyy.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 mc | |
2 | |
3 %% Time-series data | |
4 | |
5 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 10); | |
6 tsao1 = ao(p); | |
7 tsao1.setT0('2008-10-10 12:00:00') | |
8 | |
9 p = plist('waveform', 'sine wave', 'fs', 10, 'nsecs', 10, 'A', 10, 'f', 1, 'phi', 0); | |
10 tsao2 = tsao1+ao(p); | |
11 tsao2.setT0('2008-10-10 12:00:02') | |
12 | |
13 iplotyy(tsao1, tsao2, plist('RightLineStyle', '--')) | |
14 | |
15 %% Spectra | |
16 | |
17 | |
18 | |
19 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 10); | |
20 tsao1 = ao(p); | |
21 tsao1.setT0('2008-10-10 12:00:00') | |
22 | |
23 p = plist('waveform', 'sine wave', 'fs', 10, 'nsecs', 10, 'A', 10, 'f', 1, 'phi', 0); | |
24 tsao2 = ao(p); | |
25 tsao2.setT0('2008-10-10 12:00:02') | |
26 | |
27 | |
28 fs1 = tsao1.psd; | |
29 fs2 = tsao2.psd; | |
30 | |
31 iplotyy(fs1, fs2); | |
32 | |
33 iplotyy(fs1, fs2, plist('LeftYscale', 'lin')); | |
34 | |
35 iplotyy(fs1, fs2, plist('LeftYscale', 'lin', 'RightYscale', 'lin')); | |
36 | |
37 iplotyy(fs1, fs2, plist('LeftYscale', 'lin', 'RightYscale', 'lin', 'LeftXscale', 'lin', 'RightXscale', 'lin')); | |
38 | |
39 iplotyy(fs1, fs2, plist('LeftXscale', 'lin', 'RightXscale', 'lin')); | |
40 | |
41 %% Complex spectra | |
42 | |
43 pzm = pzmodel(1,1,100); | |
44 pr1 = pzm.resp; | |
45 | |
46 pzm = pzmodel(1,100,1); | |
47 pr2 = pzm.resp; | |
48 | |
49 | |
50 iplotyy(abs(pr1), phase(pr1)) | |
51 iplotyy(abs(pr2), phase(pr2)) | |
52 |