zero — Return zeros of SISO transfer-function models.
zero(sys) returns the roots of the numerator polynomial for a supported SISO tf model.
Syntax
z = zero(sys)sysmust be a SISOtfobject.
How zero works
- Supports SISO
tfobjects. - Returns an
N x 1real vector when all zeros are real. - Returns an
N x 1complex vector when any zero has a nonzero imaginary part. - Static-gain models return an empty zero vector.
sstransmission zeros are not implemented yet; usetfmodels for this builtin.
GPU memory and residency
zero returns host-resident vectors.
Example
Second-order zeros
H = tf([1 3 2], [1 4]);
zero(H)Expected output:
ans = [-1; -2]How RunMat validates zero
zero validates the input model and computes numerator roots through the shared control polynomial root path. Tests cover real, complex-conjugate, and static-gain zero vectors plus VM integration.
- Implementation: `crates/runmat-runtime/src/builtins/control/zero.rs`
See Correctness & Trust for the full methodology and coverage table.
Using zero with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how zero changes the result.
Run a small zero example, explain the result, then change one input and compare the output.
FAQ
Does zero cancel pole-zero pairs?⌄
No. It returns roots of the stored numerator polynomial for the supplied transfer-function model.
Is this the same as zeros?⌄
No. zero analyzes control models. zeros constructs numeric arrays.
Related Control functions
damp · db · dcgain · feedback · impulse · isstable · nyquist · pole · rlocus · ss · step · stepinfo · tf
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how zero is executed, line by line, in Rust.
- View the source for zero in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
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.