pzmap — Plot or return pole-zero locations for SISO transfer-function and state-space models.

pzmap(sys) plots poles and zeros for supported SISO tf and ss models. Output forms return pole and zero locations as column vectors.

Syntax

pzmap(sys)
p = pzmap(sys)
[p,z] = pzmap(sys)

Inputs

NameTypeRequiredDefaultDescription
sysAnyYesSISO tf or ss model.

Returns

NameTypeDescription
pAnyPoles of the SISO tf or ss model as a column vector.
zAnyZeros of the SISO tf or ss model as a column vector.

Returned values from pzmap depend on how many outputs the caller requests.

Errors

IdentifierWhenMessage
RunMat:pzmap:InvalidArgumentInputs do not match supported pzmap invocation forms.pzmap: invalid argument
RunMat:pzmap:InvalidModelInput system is not a valid SISO tf object.pzmap: invalid model
RunMat:pzmap:UnsupportedModelModel form is not supported by the current implementation.pzmap: unsupported model

How pzmap works

  • Supports SISO tf objects with real or complex coefficients.
  • Supports SISO ss objects by converting the state-space model to a transfer-function numerator and denominator.
  • No-output calls plot poles with x markers and zeros with o markers on the complex plane.
  • Statement-form plotting accepts one or more tf or ss systems.
  • Statement-form plotting accepts optional line-spec color/style arguments after each system, such as pzmap(sys1, 'r', sys2, 'b'); pole and zero markers for the same system use the same color.
  • Two-output calls return [p, z], where each output is a column vector.
  • Single-output calls return the pole column vector.
  • Outputs use complex tensors when any pole or zero has a nonzero imaginary component.
  • Input/output delays raise clear unsupported-model diagnostics.

GPU memory and residency

pzmap returns host-resident pole and zero tensors.

Examples

Return poles and zeros

H = tf([1 3 2], [1 4]);
[p, z] = pzmap(H);
fprintf("%.0f %.0f %.0f\n", p(1), z(1), z(2));

Expected output:

-4 -1 -2

Plot a pole-zero map

s = tf('s');
H = (s + 2) / (s^2 + 3*s + 4);
pzmap(H);
fprintf("ok\n");

Expected output:

ok

Handle state-space models

sys = ss(-1, 1, 1, 0);
[p, z] = pzmap(sys);
fprintf("%.0f %d\n", p(1), length(z));

Expected output:

-1 0

Handle complex poles

H = tf(1, [1 0 1]);
[p, z] = pzmap(H);
fprintf("%d %d\n", length(p), length(z));

Expected output:

2 0

How RunMat validates pzmap

pzmap validates object class, delay properties, output shapes, real and complex root extraction, plotting smoke, multi-system statement form, and VM dispatch.

See Correctness & Trust for the full methodology and coverage table.

Using pzmap with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how pzmap changes the result.

Run a small pzmap example, explain the result, then change one input and compare the output.

FAQ

Does pzmap support state-space models?

Yes. RunMat supports SISO ss models by converting the state-space matrices to a transfer-function representation before computing poles and zeros. MIMO state-space models are rejected with an unsupported-model diagnostic.

What does pzmap return with one output?

RunMat returns the pole column vector. Use [p, z] = pzmap(sys) when zero locations are needed.

Does pzmap run on the GPU?

No. It is a model-analysis and plotting operation and returns host-resident tensors.

damp · db · dcgain · feedback · impulse · isstable · lqr · nyquist · pole · rlocus · ss · step · stepinfo · tf · zero

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how pzmap is executed, line by line, in Rust.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.