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:
     
    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;
    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.

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

Symbolic Example

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.

What Our Students Say

★★★★★

“I got full marks on my MATLAB assignment! The solution was perfect and delivered well before the deadline. Highly recommended!”

Aditi Sharma, Mumbai
★★★★☆

“Quick delivery and excellent communication. The team really understood the problem and provided a great solution. Will use again.”

John M., Australia

Latest Blogs

Explore how MATLAB Solutions has helped clients achieve their academic and research goals through practical, tailored assistance.

MATLAB R2026a: What's New in the 2026 Release? Major Features & Highlights

MATLAB R2026a (the first major release of 2026) is now available, and it brings a strong mix of AI-powered tools, deeper language integrations, improved productivity features, and performance boosts.

Unlocking Generative AI in MATLAB: Practical Guide to MATLAB Copilot and Beyond

Generative AI in MATLAB is transforming how engineers, scientists, and researchers approach coding, prototyping, and problem-solving. No longer do you need to switch between tools or struggle with syntax MATLAB Copilot, MathWorks' officia