view m-toolbox/classes/@rational/fromCoefficients.m @ 52:daf4eab1a51e
database-connection-manager tip
Fix. Default password should be [] not an empty string
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Wed, 07 Dec 2011 17:29:47 +0100 (2011-12-07)
parents
f0afece42f48
children
line source
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % FUNCTION: fromCoefficients
+ − %
+ − % DESCRIPTION: Construct a rational from num and den coefficients
+ − %
+ − % CALL: r = fromCoefficients(a, pl)
+ − %
+ − % PARAMETER: pl - plist
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − function r = fromCoefficients(r, pli)
+ −
+ − VERSION = '$Id: fromCoefficients.m,v 1.7 2011/08/15 12:42:01 hewitson Exp $';
+ −
+ −
+ − % get pzmodel info
+ − ii = rational.getInfo('rational', 'From Coefficients');
+ −
+ − % Set the method version string in the minfo object
+ − ii.setMversion([VERSION '-->' ii.mversion]);
+ −
+ − % Combine input plist with default values
+ − pl = applyDefaults(ii.plists, pli);
+ −
+ − % Set fields
+ − r.num = find(pl, 'num');
+ − r.den = find(pl, 'den');
+ −
+ − % Add history
+ − r.addHistory(ii, pl, [], []);
+ −
+ − % Set object properties
+ − r.setObjectProperties(pl);
+ −
+ − end