zp2tf
Convert zero-pole-gain filter parameters to transfer function form
Syntax
Description
Examples
Transfer Function of Mass-Spring System
Compute the transfer function of a damped mass-spring system that obeys the differential equation
The measurable quantity is the acceleration, , and is the driving force. In Laplace space, the system is represented by
The system has unit gain, a double zero at , and two complex-conjugate poles.
k = 1; z = [0 0]'; p = roots([1 0.01 1])
p = 2×1 complex
-0.0050 + 1.0000i
-0.0050 - 1.0000i
Use zp2tf
to find the transfer function.
[b,a] = zp2tf(z,p,k)
b = 1×3
1 0 0
a = 1×3
1.0000 0.0100 1.0000
Input Arguments
z
— Zeros
column vector | matrix
Zeros of the system, specified as a column vector or a matrix.
z
has as many columns as there are outputs. The zeros must be
real or come in complex conjugate pairs. Use Inf
values as
placeholders in z
if some columns have fewer zeros than
others.
Example: [1 (1+1j)/2 (1-1j)/2]'
Data Types: single
| double
Complex Number Support: Yes
p
— Poles
column vector
Poles of the system, specified as a column vector. The poles must be real or come in complex conjugate pairs.
Example: [1 (1+1j)/2 (1-1j)/2]'
Data Types: single
| double
Complex Number Support: Yes
k
— Gains
column vector
Gains of the system, specified as a column vector.
Example: [1 2 3]'
Data Types: single
| double
Output Arguments
b
— Transfer function numerator coefficients
row vector | matrix
Transfer function numerator coefficients, returned as a row vector or a matrix. If
b
is a matrix, then it has a number of rows equal to the number
of columns of z
.
a
— Transfer function denominator coefficients
row vector
Transfer function denominator coefficients, returned as a row vector.
Algorithms
The system is converted to transfer function form using poly
with p
and the columns of z
.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced before R2006a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)