Mercurial > hg > ltpda
comparison m-toolbox/test/test_ao_hist.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_AO_HIST tests the histogram function of the AO class. | |
2 % | |
3 % M Hewitson 24-05-07 | |
4 % | |
5 % $Id: test_ao_hist.m,v 1.8 2009/02/02 15:20:37 hewitson Exp $ | |
6 % | |
7 function test_ao_hist() | |
8 | |
9 | |
10 % Make some time-series data | |
11 nsecs = 1000; | |
12 fs = 100; | |
13 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'randn(size(t))'); | |
14 a1 = ao(pl); | |
15 | |
16 % Make some frequency series data | |
17 a2 = psd(a1); | |
18 | |
19 % Make some cdata | |
20 a3 = ao(randn(nsecs*fs,1)); | |
21 | |
22 % Make histograms | |
23 s1 = a1 + a3; | |
24 h1 = hist(a1,plist('N', 100)); | |
25 h2 = hist(a2,plist('N', 100)); | |
26 | |
27 h3 = hist(a3,plist('N', 100)); | |
28 h4 = hist(a3,plist('X', h3.data.x)); | |
29 h5 = hist(s1,plist('N', 100)); | |
30 | |
31 % Plot | |
32 pl = plist('Function', 'stairs'); | |
33 iplot(h5, pl) | |
34 plot(h5.hist) | |
35 | |
36 iplot(h1, pl) | |
37 iplot(h2, pl) | |
38 iplot(h3, pl) | |
39 iplot(h4, pl) | |
40 iplot(h5, pl) | |
41 | |
42 | |
43 end | |
44 % END |