diff m-toolbox/test/test_mfir_class.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_mfir_class.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,40 @@
+% TEST_MFIR_CLASS tests run on mfir class.
+%
+% M Hewitson 11-05-07
+%
+% $Id: test_mfir_class.m,v 1.5 2009/02/02 15:20:38 hewitson Exp $
+%
+function test_mfir_class()
+  
+  
+  % Empty constructor
+  f = mfir()
+  
+  % Lowpass from plist
+  pl = plist('type', 'lowpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
+  f  = mfir(pl)
+  
+  resp(f, plist('f1', 1,'f2', 50))
+  
+  % Highpass from plist
+  pl = plist('type', 'highpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
+  f  = mfir(pl)
+  
+  resp(f, plist('f1', 1,'f2', 50))
+  
+  % Bandpass from plist
+  pl = plist('type', 'bandpass', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
+  % pl.append('Win', specwin('Kaiser', 10, 250));
+  f  = mfir(pl)
+  
+  resp(f, plist('f1', 0.0001,'f2', 50));
+  
+  % Bandreject from plist
+  pl = plist('type', 'bandreject', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
+  % pl.append('Win', specwin('Kaiser', 10, 250));
+  f  = mfir(pl)
+  
+  resp(f, plist('f1', 0.0001, 'scale', 'log'));
+  
+end
+% END
\ No newline at end of file