diff m-toolbox/test/test_getAOsInTimeSpan.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_getAOsInTimeSpan.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,45 @@
+
+% A test function for the AO method getAOsInTimeSpan.
+% 
+% M Hewitson 25-02-08
+% 
+% $Id: test_getAOsInTimeSpan.m,v 1.2 2008/09/19 14:03:50 ingo Exp $
+% 
+
+clear
+
+
+%% Test with no connection input
+hostname = '130.75.117.67';
+dbname   = 'ltpda_test';
+channels = {'channelX', 'channelZ'};
+ts       = timespan('2007-01-01 12:10:00', '2007-01-01 12:40:00');
+
+
+% Build plist
+pl = plist('hostname', hostname, 'database', dbname, 'channels', channels, 'timespan', ts);
+
+objs = ltpda_getAOsInTimeSpan(pl);
+
+iplot(objs)
+
+%% Test with input connection
+
+server   = '130.75.117.67';
+dbname   = 'ltpda_test';
+channels = {'channelX', 'channelZ'};
+ts       = timespan('2007-01-01 12:10:00', '2007-01-01 12:40:00');
+
+% Make db connection
+conn = mysql_connect(server, dbname);
+
+% Build plist
+pl = plist('conn', conn, 'channels', channels, 'timespan', ts);
+
+objs = ltpda_getAOsInTimeSpan(pl);
+
+% Close connection
+close(conn);
+
+iplot(objs)
+