comparison m-toolbox/test/test_lincom_cdata.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 script for ltpda_lincom.
2 %
3 % M Hewitson 14-02-07
4 %
5 % $Id: test_lincom_cdata.m,v 1.14 2009/02/02 15:20:38 hewitson Exp $
6 %
7 function test_lincom_cdata()
8
9
10 % Make test AOs
11 nsecs = 10;
12 fs = 1000;
13
14 pl = plist();
15 pl.append('nsecs', nsecs);
16 pl.append('fs', fs);
17 pl.append('tsfcn', 'sin(2*pi*7.433*t) + randn(size(t))');
18
19 a1 = ao(pl);
20 a2 = ao(pl);
21 a3 = ao(pl);
22 a4 = ao(pl);
23
24
25 % Make a cdata AO with the coefficients in
26 b = ao([1 2 3]);
27
28 %% Make linear combination
29 c = lincom(a1, a2, a3, b);
30
31 iplot(c)
32 plot(c.hist)
33
34 % Reproduce from history
35 a_out = rebuild(c);
36
37 iplot(a_out)
38 plot(a_out.hist)
39
40 end
41 % END