eqtflength - Equalize lengths of transfer function's numerator and denominator
Syntax
[b,a] = eqtflength(num,den)
[b,a,n,m] = eqtflength(num,den)
Description
[b,a] = eqtflength(num,den) modifies the
vector num and/or the vector den,
so that the resulting output vectors b and a have
the same length. The input vectors num and den may
have different lengths. The vector num represents
the numerator polynomial of a given discrete-time transfer function,
and the vector den represents its denominator.
The resulting numerator b and denominator a represent
the same discrete-time transfer function, but these vectors have the
same length.
[b,a,n,m] = eqtflength(num,den) modifies the
vectors as above and also returns the numerator order n and
the denominator m, not including any trailing zeros.
Use eqtflength to obtain a numerator and
denominator of equal length before applying transfer function conversion
functions such as tf2ss and tf2zp to discrete-time models.
Examples
num = [1 0.5];
den = [1 0.75 0.6 0];
[b,a,n,m] = eqtflength(num,den)
b =
1.0000 0.5000 0
a =
1.0000 0.7500 0.6000
n =
1
m =
2
Algorithm
eqtflength(num,den) appends zeros to either num or den as
necessary. If both num and den have
trailing zeros in common, these are removed.
See Also
tf2ss, tf2zp
 | equiripple | | fdatool |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit