Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/utp_1.1/utp_fcns/get_test_objects_pzmodel.m Tue Dec 06 18:42:11 2011 +0100 @@ -0,0 +1,41 @@ +% GET_TEST_OBJECTS_PZMODEL returns a set of PZMODEL objects suitable for many of the UTPs +% +% CALL: [pz1, pz2, pz3, pz4, pz5, pzv, pzm] = get_test_objects_pzmodel +% +% OUTPUTS: +% pz1 - A pzmodel with no zeros +% pz2 - A pzmodel with no poles +% pz3 - A pzmodel with both poles and zeros +% pz4 - An empty pzmodel +% pzv - [pz1 pz2 pz3] +% pzm - [pz1 pz2 pz3; pz2 pz3 pz1]; +% +% +% M Hewitson 06-08-08 +% +% $Id: get_test_objects_pzmodel.m,v 1.4 2009/01/08 16:43:30 ingo Exp $ +% +function [pz1, pz2, pz3, pz4, pz5, pzv, pzm] = get_test_objects_pzmodel + + + %% PZ1 + pz1 = pzmodel(1, pz(1), []); + pz1.setName(); + %% PZ2 + pz2 = pzmodel(1, [], pz(1)); + pz2.setName(); + %% PZ3 + pz3 = pzmodel(1, [pz(1) pz(1,2)], pz(10)); + pz3.setName(); + %% PZ4 + pz4 = pzmodel(); + pz4.setName(); + %% PZ5 + pz5 = pzmodel(2, [pz(1) pz(1+2i)], pz(10), unit('V'), unit('Hz')); + pz5.setName(); + %% PZV + pzv = [pz1 pz2 pz3]; + %% PZM + pzm = [pz1 pz2 pz3; pz4 pz5 pz1]; + +end