Z-Transform in MATLAB

MATLAB Illustration

Notes on Z-Transform in MATLAB

The Z-transform is the discrete-time counterpart of the Laplace transform, used for analyzing digital filters, control systems, and signal processing. MATLAB's Signal Processing Toolbox provides powerful functions for symbolic and numerical Z-transform computation, pole-zero analysis, and time-domain responses.

Key Functions

  • ztrans() (Symbolic Math Toolbox): Symbolic Z-transform.
  • tf() + dimpulse(), dstep(): Numerical responses for transfer functions.
  • zplane(z,p) or zplane(sys): Pole-zero plot in the z-plane (unit circle for stability).
zplane - Zero-pole plot for discrete-time systems - MATLAB

MathWorks example of zero-pole plot using zplane.

residuez - Z-transform partial-fraction expansion - MATLAB

Residue plot from partial fraction expansion.

  • residuez(): Partial fraction expansion (residues, poles, direct term) for inverse Z-transform.

Simple pole-zero map example.

  • freqz(): Frequency response of digital filter (from z-domain).
  • impz(): Impulse response from filter coefficients.

Basic Steps

  1. Define Discrete Transfer Function:
    MATLAB
    b = [1 0];
    a = [1 -0.5];
    % Example: H(z) = z / (z - 0.5)  sys = tf(b, a, -1);
    % Ts = -1 indicates discrete (z-domain)
  2. Pole-Zero Plot:
    zplane(b, a); grid on;
    MATLAB
    title('Pole-Zero Plot');
  3. Impulse Response:
    impz(b, a, 20); % First 20 samples
A Discrete time Resonator in MATLAB | RGHMatlab

Example discrete-time impulse response plot.

MATLAB
4. **Partial Fraction Expansion**:  ```matlab  [r, p, k] = residuez(b, a);
% r: residues, p: poles, k: direct term  disp([r p k]);

Symbolic Example

MATLAB
syms z n  H = z / (z - 0.5);
h = iztrans(H);
% Inverse:  (0.5)^n * u(n)
Tips
  • Stability: Poles inside unit circle → stable.
  • Use fvtool(b,a) for interactive filter visualization (magnitude, phase, etc.).
  • Combine with filter() to process signals.
Verified Feedback

What Engineering Students Say

Real feedback from students across top engineering universities worldwide.

Verified Student

“I got full marks on my MATLAB DSP assignment! The filter design code was completely vectorized, the frequency response plots were exact, and the delivery was 8 hours before my deadline. Highly recommended!”

AS

Aditi Sharma

IIT Bombay • Signal Processing Coursework
Verified Student

“Our Simulink EV powertrain model had severe algebraic loop and solver errors. The MATLABSolutions team fixed the solver configuration in 4 hours and provided an annotated scope diagram. Lifesaver for my final year!”

JM

John M.

Monash University, Australia • Simulink Dynamic Model
Technical Knowledge Base

Latest MATLAB Guides & Tutorials

Explore deep-dive technical articles written by our engineering team to master complex MATLAB & Simulink topics.

MATLAB Guide 5 Min Read

Physics-Informed Neural Networks (PINNs) for Microgrid Dynamics and Power Flow in MATLAB

Modern microgrids operate with low physical inertia, rapid inverter switching dynamics, and intermittent renewable power generation. Simulating these systems requir...

MATLAB Guide 5 Min Read

ROS 2 and MATLAB Co-Simulation for Autonomous Mobile Robot Path Tracking Using NMPC

Tracking complex trajectories with non-holonomic mobile robots requires handling physical constraints such as actuator saturation, wheel slip, and sharp cornering. Standard cont...