comparison testing/utp_1.1/utp_fcns/get_test_objects_pzmodel.m @ 44:409a22968d5e default

Add unit tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 18:42:11 +0100
parents
children
comparison
equal deleted inserted replaced
43:bc767aaa99a8 44:409a22968d5e
1 % GET_TEST_OBJECTS_PZMODEL returns a set of PZMODEL objects suitable for many of the UTPs
2 %
3 % CALL: [pz1, pz2, pz3, pz4, pz5, pzv, pzm] = get_test_objects_pzmodel
4 %
5 % OUTPUTS:
6 % pz1 - A pzmodel with no zeros
7 % pz2 - A pzmodel with no poles
8 % pz3 - A pzmodel with both poles and zeros
9 % pz4 - An empty pzmodel
10 % pzv - [pz1 pz2 pz3]
11 % pzm - [pz1 pz2 pz3; pz2 pz3 pz1];
12 %
13 %
14 % M Hewitson 06-08-08
15 %
16 % $Id: get_test_objects_pzmodel.m,v 1.4 2009/01/08 16:43:30 ingo Exp $
17 %
18 function [pz1, pz2, pz3, pz4, pz5, pzv, pzm] = get_test_objects_pzmodel
19
20
21 %% PZ1
22 pz1 = pzmodel(1, pz(1), []);
23 pz1.setName();
24 %% PZ2
25 pz2 = pzmodel(1, [], pz(1));
26 pz2.setName();
27 %% PZ3
28 pz3 = pzmodel(1, [pz(1) pz(1,2)], pz(10));
29 pz3.setName();
30 %% PZ4
31 pz4 = pzmodel();
32 pz4.setName();
33 %% PZ5
34 pz5 = pzmodel(2, [pz(1) pz(1+2i)], pz(10), unit('V'), unit('Hz'));
35 pz5.setName();
36 %% PZV
37 pzv = [pz1 pz2 pz3];
38 %% PZM
39 pzm = [pz1 pz2 pz3; pz4 pz5 pz1];
40
41 end