comparison testing/utp_1.1/utp_fcns/get_test_objects_parfrac.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_PARFRAC returns a set of PARFRAC objects suitable for many of the UTPs
2 %
3 % CALL: [pf1,pf2,pf3,pfv,pfm] = get_test_objects_parfrac
4 %
5 % OUTPUTS:
6 % pf1 - parfrac object without direct term
7 % pf2 - parfrac object with direct term
8 % pf3 - parfrac object with I-/O- units
9 % pfv - [pf1, pf2, pf3];
10 % pfm - [pf1, pf2, pf3; pf1 pf2 pf3];
11 %
12 %
13 % M Hewitson 06-08-08
14 %
15 % $Id: get_test_objects_parfrac.m,v 1.3 2011/04/04 13:35:56 ingo Exp $
16 %
17 function [pf1,pf2,pf3,pfv,pfm] = get_test_objects_parfrac
18
19
20 %% empty parfrac object
21 pf1 = parfrac([1 2], [4, 6+2i]);
22 pf1.setName();
23
24 %% parfrac object only with poles
25 pf2 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], [1 2]);
26 pf2.setName();
27
28 %% parfrac object with I-/O- units
29 pf3 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], [1 2 3 4], 'my par frac', unit('V'), unit('Hz'));
30 pf3.setName();
31
32 %% PARFRAC vector
33 pfv = [pf1, pf2, pf3];
34
35 %% PARFRAC matrix
36 pfm = [pf1, pf2, pf3; pf1 pf2 pf3];
37
38 end
39
40