diff m-toolbox/test/test_ao_scale.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_scale.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,24 @@
+% A simple test script to test the ao/scale method
+% 
+% M Hewitson
+% 
+% $Id: test_ao_scale.m,v 1.2 2009/02/02 15:20:39 hewitson Exp $
+% 
+
+mc
+
+%% Make AOs
+
+ts = ao(plist('tsfcn', 't.^2', 'fs', 10, 'nsecs', 1))
+xy = ao(plist('xyfcn', 'sqrt(x)', 'x', 1:10)) 
+fs = ao(plist('fsfcn', '1./f', 'f', 'logspace(-4,0,1000)'))
+ca = ao(1:10)
+
+%% Scale all of them
+
+sts1 = ts.scale(plist('factor', 3))
+sts2 = ts.scale(plist('factor', 3, 'yunits', 'Hz'))
+sts3 = ts.scale(2, plist('yunits', 'Hz'))
+
+tss = scale([sts1 sts2 sts3], plist('factor', 4))
+