Mercurial > hg > ltpda
comparison m-toolbox/test/test_split_chunks.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 % function a_out = test_ao_split_chunks | |
2 % Test AO split. | |
3 % | |
4 % M Hewitson 23-02-08 | |
5 % | |
6 % $Id: test_split_chunks.m,v 1.1 2008/02/23 16:34:19 hewitson Exp $ | |
7 % | |
8 | |
9 % Test AO | |
10 | |
11 a1 = ao(plist('tsfcn', 'sin(2*pi*0.1*t)', 'nsecs', 100, 'fs', 10)); | |
12 | |
13 % Split into chunks | |
14 as = split(a1, plist('split_type', 'chunks', 'N', 10)); | |
15 | |
16 % Plot chunks | |
17 iplot(as, plist('Markers', {'All', 'o'})) | |
18 | |
19 b = join(as); | |
20 figure | |
21 plot(b.hist); | |
22 | |
23 iplot(a1, b) | |
24 iplot(a1./b); | |
25 | |
26 return | |
27 | |
28 %% Recreate from history | |
29 | |
30 % Write an m-file from AO | |
31 ao2m(b, 'ltpda_test.m'); | |
32 | |
33 % now run it | |
34 clear all | |
35 a_out = ltpda_test; | |
36 | |
37 iplot(a_out) | |
38 figure | |
39 plot(a_out.hist) | |
40 | |
41 %% Delete test files | |
42 % delete('ltpda_test.m'); | |
43 | |
44 | |
45 | |
46 | |
47 |