| Contents | Index |
model= setPolyFormat(model,
'cell')
model= setPolyFormat(model,
'double')
model= setPolyFormat(model, 'cell') converts the B and F polynomials of a multi-input polynomial model, model, from double matrices to cell arrays. Each cell array has Nu-elements of double vectors, where Nu is the number of inputs.
model= setPolyFormat(model, 'double') allows you to continue using double matrices for the B and F polynomials. The model displays a message that it is in backward compatibility mode.
The B and F polynomials, represented by b and f properties of idpoly object, are currently double matrices. For multi-input polynomial models, these polynomials will be cell arrays in a future version. Using setPolyFormat allows you to either change to using cell arrays immediately or continue using double arrays without errors in a future version.
After using model = setPolyFormat(model, 'cell'), update your code to use cell array syntax for operations on the b and f properties.
After using model = setPolyFormat(model, 'double'), you can continue using double matrix syntax for operations on the b and f properties.
setPolyFormat has no effect on single-input idpoly models, where the b and f properties continue to be represented by double row vectors.
Convert the B and F polynomials of an estimated multi-input ARX model to cell arrays:
Estimate a 3-input ARX model.
% Load estimation data. load iddata8 % Estimate model. m = arx(z8, [3 [2 2 1] [1 1 1]]);
The software computes the B and F polynomials and stores their values as double matrices in the b and f properties. Operations on the B and F polynomials, such as m.b, produce an incompatibility warning.
Convert the B and F polynomials to cell arrays.
m=setPolyFormat(m,'cell');
To verify that the B and F polynomials are cell arrays, type class(m.b), which returns:
ans = cell
Extract pole and zero information from the model using cell array syntax.
Poles1 = roots(m.f{1});
Zeros1 = roots(m.b{1});
Continue using double matrices for B and F polynomials of an estimated multi-input ARX model:
Estimate a 3-input ARX model.
% Load estimation data. load iddata8 % Estimate model. m = arx(z8, [3 [2 2 1] [1 1 1]]);
The software computes the B and F polynomials, and stores their values in double matrices in the b and f properties. Operations on the B and F polynomials, such as m.b, produce an incompatibility warning.
Designate the model to continue using double matrices for the B and F polynomials for backward compatibility.
m=setPolyFormat(m,'double')
The following message at the MATLAB prompt indicates that the model is backward compatible:
(model configured to operate in backward compatibility mode)
Extract pole and zero information from the model using matrix syntax.
Poles1 = roots(m.f(1,:)) Zeros1 = roots(m.b(1,:))
get | idpoly | polydata | set | tfdata

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |