Signal Toolkit - eqtflength


[b, a] = eqtflength (num, den)
[b, a, n, m] = eqtflength (num, den)

Equalize numerator and denominator polynomial lengths.

Pads the shorter polynomial with trailing zeros so that the returned numerator b and denominator a have equal length while representing the same discrete-time transfer function.

Outputs n and m are the numerator and denominator orders, respectively, excluding trailing zeros.

Example:

 [b, a] = eqtflength ([1 2], [1 0.5 0.25])
 ⇒
      b =
          1 2 0
      a =
          1.0000 0.5000 0.2500
 

See also: tf2ss, tf2zp.