comparison m-toolbox/test/test_miir_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 the constructor for miir objects.
2 %
3 % M Hewitson 11-02-07
4 %
5 % $Id: test_miir_class.m,v 1.20 2009/02/02 15:20:38 hewitson Exp $
6 %
7 function test_miir_class()
8
9
10 % Example 1 - empty
11
12 f = miir()
13
14 % Example 2 - standard types
15
16 % bandpass
17 pl = plist('type', 'bandpass', 'fs', 1000, 'fc', [50 100], 'order', 3);
18 f1 = miir(pl);
19
20 % highpass
21 pl = plist('type', 'highpass', 'fs', 1000, 'fc', 60, 'order', 3);
22 f2 = miir(pl);
23
24
25 % Plot response
26
27 pl = plist('f1', 10, 'f2', 200);
28 a1 = resp(f1, pl);
29 a2 = resp(f2, pl);
30 a3 = a2.*a1;
31 a4 = a2./a1;
32
33 iplot(a1, a2, a3, a4)
34
35 % Plot history
36 plot([a3.hist a4.hist])
37
38
39 end
40
41
42
43