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.

MCP-Enabled Robotics Control Systems with MATLAB

In today\\\'s rapidly advancing era of automation, robotics control systems are evolving to meet the demand for smarter, faster, and more reliable performance. Among the many innovations driving this transformation is the use of MCP (Model-based Control Paradigms)

LLM-Driven Financial Forecasting Models in MATLAB

The financial sector is witnessing a technological revolution with the rise of Large Language Models (LLMs). Traditionally used for text analysis, LLMs are now being integrated with powerful platforms like MATLAB to develop financial forecasting models