view 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
line wrap: on
line source

% GET_TEST_OBJECTS_PARFRAC returns a set of PARFRAC objects suitable for many of the UTPs
%
% CALL:     [pf1,pf2,pf3,pfv,pfm] = get_test_objects_parfrac
%
% OUTPUTS:
%           pf1  - parfrac object without direct term
%           pf2  - parfrac object with direct term
%           pf3  - parfrac object with I-/O- units
%           pfv  - [pf1, pf2, pf3];
%           pfm  - [pf1, pf2, pf3; pf1 pf2 pf3];
%
%
% M Hewitson 06-08-08
%
% $Id: get_test_objects_parfrac.m,v 1.3 2011/04/04 13:35:56 ingo Exp $
%
function [pf1,pf2,pf3,pfv,pfm] = get_test_objects_parfrac


  %% empty parfrac object
  pf1 = parfrac([1 2], [4, 6+2i]);
  pf1.setName();

  %% parfrac object only with poles
  pf2 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], [1 2]);
  pf2.setName();

  %% parfrac object with I-/O- units
  pf3 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], [1 2 3 4], 'my par frac', unit('V'), unit('Hz'));
  pf3.setName();

  %% PARFRAC vector
  pfv = [pf1, pf2, pf3];

  %% PARFRAC matrix
  pfm = [pf1, pf2, pf3; pf1 pf2 pf3];

end