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.

Battery Management System (BMS) in Electric Vehicles Using MATLAB & Simulink

The rapid adoption of electric vehicles (EVs) has increased the demand for efficient battery management systems (BMS). As the battery is the primary energy source of an EV, ensuring its safety, performance, and longevity is c

A Developer’s Guide to Battery SOC Estimation in MATLAB & Simulink

Imagine you are driving an EV. The dashboard screen shows a comforting 15% State of Charge (SOC)plenty of range to reach the next charging station. Then, suddenly, the powertrain loses power and the car shuts down.  In the BMS world, this is the ultimate nightmare. It’s the result of i