Mercurial > hg > ltpda
view testing/utp_1.1/utp_fcns/get_test_objects_rational.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 source
% GET_TEST_OBJECTS_RATIONAL returns a set of RATIONAL objects suitable for many of the UTPs % % CALL: [ra1,ra2,ra3,rav,ram] = get_test_objects_rational % % OUTPUTS: % ra1 - rational object without direct term % ra2 - rational object with direct term % ra3 - rational object with I-/O- units % rav - [ra1, ra2, ra3]; % ram - [ra1, ra2, ra3; ra1 ra2 ra3]; % % % M Hewitson 06-08-08 % % $Id: get_test_objects_rational.m,v 1.1 2009/02/08 16:37:26 ingo Exp $ % function [ra1,ra2,ra3,rav,ram] = get_test_objects_rational %% rational object from pzmodel pzm = pzmodel(12, {2, [3 5], 7}, {1+2i 5}); ra1 = rational(pzm); ra1.setName(); %% rational object from parfrac object pf = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], [1 2]); ra2 = rational(pf); ra2.setName(); %% rational object (num, den, name, iunits, ounits) ra3 = rational([1 2 3], [4 5 6 7], 'my rational', unit('V'), unit('Hz')); ra3.setName(); %% rational vector rav = [ra1, ra2, ra3]; %% rational matrix ram = [ra1, ra2, ra3; ra1 ra2 ra3]; end