Mercurial > hg > ltpda
diff m-toolbox/test/test_ao_index.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/test_ao_index.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,47 @@ +function test_ao_index() + +% TEST_AO_INDEX tests the index() method of the AO class. +% +% M Hewitson 02-05-07 +% +% $Id: test_ao_index.m,v 1.4 2008/09/19 14:03:50 ingo Exp $ +% + + +a1 = ao(plist('tsfcn', 'randn(size(t))', 'fs', 100, 'nsecs', 10)); +% Make a filter +f1 = miir(plist('type', 'highpass', 'fc', 20)); + + +% Filter the input data +[a2, f1] = filter(a1, plist('filter', f1)); + + + +aos = cpsd([a1 a2]); + +%% index output matrix of AOs + +a11 = index(aos, 1,2) + +% return +iplot(a11) +plot(a11.hist) + + +%% Save to .m file +type(a11, 'test.m'); +% edit 'test.m' + +%% Recreate from history + +% now run it +mc + +a1 = test() + +iplot(a1) +plot(a1.hist) + + +