diff m-toolbox/test/test_ao_iplotyy.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_iplotyy.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,52 @@
+mc
+
+%% Time-series data
+
+p      = plist('waveform', 'noise', 'fs', 10, 'nsecs', 10);
+tsao1  = ao(p);
+tsao1.setT0('2008-10-10 12:00:00')
+
+p      = plist('waveform', 'sine wave', 'fs', 10, 'nsecs', 10, 'A', 10, 'f', 1, 'phi', 0);
+tsao2  = tsao1+ao(p);
+tsao2.setT0('2008-10-10 12:00:02')
+
+iplotyy(tsao1, tsao2, plist('RightLineStyle', '--'))
+
+%% Spectra
+
+
+
+p      = plist('waveform', 'noise', 'fs', 10, 'nsecs', 10);
+tsao1  = ao(p);
+tsao1.setT0('2008-10-10 12:00:00')
+
+p      = plist('waveform', 'sine wave', 'fs', 10, 'nsecs', 10, 'A', 10, 'f', 1, 'phi', 0);
+tsao2  = ao(p);
+tsao2.setT0('2008-10-10 12:00:02')
+
+
+fs1 = tsao1.psd;
+fs2 = tsao2.psd;
+
+iplotyy(fs1, fs2);
+
+iplotyy(fs1, fs2, plist('LeftYscale', 'lin'));
+
+iplotyy(fs1, fs2, plist('LeftYscale', 'lin', 'RightYscale', 'lin'));
+
+iplotyy(fs1, fs2, plist('LeftYscale', 'lin', 'RightYscale', 'lin', 'LeftXscale', 'lin', 'RightXscale', 'lin'));
+
+iplotyy(fs1, fs2, plist('LeftXscale', 'lin', 'RightXscale', 'lin'));
+
+%% Complex spectra
+
+pzm = pzmodel(1,1,100);
+pr1 = pzm.resp;
+
+pzm = pzmodel(1,100,1);
+pr2 = pzm.resp;
+
+
+iplotyy(abs(pr1), phase(pr1))
+iplotyy(abs(pr2), phase(pr2))
+