zpk2tf

zpk2tf(z, p, k)

Try it yourself:


Convert zeros, poles, and gain to a transfer function

zpk2tf converts a system represented by its zeros, poles, and gain into transfer-function numerator and denominator coefficients. This representation is common in control theory and digital signal processing because zeros and poles describe system behavior geometrically, while coefficient form is convenient for evaluation and filtering.

What the conversion means

Zeros are roots of the numerator, poles are roots of the denominator, and gain scales the result. Zpk2tf expands those factors into polynomial coefficient arrays. Use polynomialRoot when solving a polynomial in the opposite direction, and multiply when manually composing small polynomial factors.

Workflow example

After obtaining transfer-function coefficients, use freqz to examine a digital filter’s frequency response. Zeros near a frequency can attenuate it, while poles near the unit circle can produce a strong response. Use abs and arg to inspect magnitude and phase.

Important caveats

Coefficient order and normalization conventions matter, especially for complex-conjugate roots and high-order systems. Numerically expanding many roots can be ill-conditioned; retain a zero-pole-gain representation when it is more stable or interpretable. Verify denominator coefficients carefully, since unstable poles can produce unbounded behavior. Use size to confirm the resulting coefficient-array lengths.

Try Zpk2tf in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions