comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % TEST_MFIR_CLASS tests run on mfir class.
2 %
3 % M Hewitson 11-05-07
4 %
5 % $Id: test_mfir_class.m,v 1.5 2009/02/02 15:20:38 hewitson Exp $
6 %
7 function test_mfir_class()
8
9
10 % Empty constructor
11 f = mfir()
12
13 % Lowpass from plist
14 pl = plist('type', 'lowpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
15 f = mfir(pl)
16
17 resp(f, plist('f1', 1,'f2', 50))
18
19 % Highpass from plist
20 pl = plist('type', 'highpass', 'Win', specwin('Kaiser', 10, 150), 'fs', 100, 'fc', 20);
21 f = mfir(pl)
22
23 resp(f, plist('f1', 1,'f2', 50))
24
25 % Bandpass from plist
26 pl = plist('type', 'bandpass', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
27 % pl.append('Win', specwin('Kaiser', 10, 250));
28 f = mfir(pl)
29
30 resp(f, plist('f1', 0.0001,'f2', 50));
31
32 % Bandreject from plist
33 pl = plist('type', 'bandreject', 'fs', 100, 'order', 1024, 'fc', [0.1 10]);
34 % pl.append('Win', specwin('Kaiser', 10, 250));
35 f = mfir(pl)
36
37 resp(f, plist('f1', 0.0001, 'scale', 'log'));
38
39 end
40 % END