comparison m-toolbox/classes/@rational/fromCoefficients.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % FUNCTION: fromCoefficients
4 %
5 % DESCRIPTION: Construct a rational from num and den coefficients
6 %
7 % CALL: r = fromCoefficients(a, pl)
8 %
9 % PARAMETER: pl - plist
10 %
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 function r = fromCoefficients(r, pli)
13
14 VERSION = '$Id: fromCoefficients.m,v 1.7 2011/08/15 12:42:01 hewitson Exp $';
15
16
17 % get pzmodel info
18 ii = rational.getInfo('rational', 'From Coefficients');
19
20 % Set the method version string in the minfo object
21 ii.setMversion([VERSION '-->' ii.mversion]);
22
23 % Combine input plist with default values
24 pl = applyDefaults(ii.plists, pli);
25
26 % Set fields
27 r.num = find(pl, 'num');
28 r.den = find(pl, 'den');
29
30 % Add history
31 r.addHistory(ii, pl, [], []);
32
33 % Set object properties
34 r.setObjectProperties(pl);
35
36 end