Mercurial > hg > ltpda
comparison m-toolbox/test/test_minus.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 % A test script for the AO minus. | |
2 % | |
3 % M Hewitson 16-03-07 | |
4 % | |
5 % $Id: test_minus.m,v 1.13 2009/02/02 15:20:38 hewitson Exp $ | |
6 % | |
7 function test_minus() | |
8 | |
9 % Make test AOs | |
10 nsecs = 10; | |
11 fs = 1000; | |
12 | |
13 pl = plist('nsecs', nsecs, 'fs', fs, 'tsfcn', 'sin(2*pi*7.433*t) + randn(size(t))'); | |
14 | |
15 a1 = ao(pl); | |
16 a2 = ao(pl); | |
17 | |
18 % add and plot | |
19 a3 = a1-2; | |
20 | |
21 iplot(a3) | |
22 plot(a3.hist) | |
23 | |
24 | |
25 % Reproduce from history | |
26 a_out = rebuild(a3); | |
27 | |
28 iplot(a_out) | |
29 plot(a_out.hist) | |
30 | |
31 end |