RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.2, Nov 26, 2026 ·

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • bode
    • evalfr
    • freqresp
    • impulse
    • nyquist
    • step

nyquist — Compute or plot the Nyquist frequency response of a SISO transfer function.

nyquist(sys) plots a supported scalar SISO tf model when outputs are discarded. Output forms return real, imaginary and frequency columns for the default or explicit frequency grid. Continuous models are evaluated at s = jω; discrete models use z = exp(jωTs). State-space, FRD, model arrays and MIMO inputs are not yet supported.

Syntax

nyquist(sys)
nyquist(sys,w)
re = nyquist(sys,w)
[re,im] = nyquist(sys,w)
[re,im,wout] = nyquist(sys,w)
[re,im,wout] = nyquist(sys)
re = nyquist(sys)

Inputs

sys
Type
Any
Required
Yes
Description
Scalar SISO tf model.
w
Type
NumericArray
Required
No
Description
Finite nonnegative angular frequencies.
NameTypeRequiredDefaultDescription
sysAnyYes—Scalar SISO tf model.
wNumericArrayNo—Finite nonnegative angular frequencies.

Returns

re
Type
NumericArray
Description
Real response column.
im
Type
NumericArray
Description
Imaginary response column.
wout
Type
NumericArray
Description
Frequency column.
NameTypeDescription
reNumericArrayReal response column.
imNumericArrayImaginary response column.
woutNumericArrayFrequency column.

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

Errors

RunMat:nyquist:InvalidArgument
When
Invocation form, frequency input or output count is invalid.
Message
nyquist: invalid argument
RunMat:nyquist:InvalidModel
When
Required model properties are malformed.
Message
nyquist: invalid model
RunMat:nyquist:UnsupportedModel
When
The model is well formed but outside supported SISO tf behavior.
Message
nyquist: unsupported model
IdentifierWhenMessage
RunMat:nyquist:InvalidArgumentInvocation form, frequency input or output count is invalid.nyquist: invalid argument
RunMat:nyquist:InvalidModelRequired model properties are malformed.nyquist: invalid model
RunMat:nyquist:UnsupportedModelThe model is well formed but outside supported SISO tf behavior.nyquist: unsupported model
RunMat:nyquist:InternalNumeric response or argument materialization fails internally.nyquist: internal error
RunMat:nyquist:PlotFailedStatement-form plotting fails for reasons other than known nonfatal setup conditions.nyquist: plotting failed

Frequency grid and outputs

An explicit w must be a nonempty vector of finite nonnegative angular frequencies. With no w, a continuous model uses a deterministic logarithmic grid based on poles and zeros; a discrete model uses 200 points inside zero and the Nyquist frequency π/Ts, excluding potentially singular endpoints. These grid choices describe RunMat behavior, not verified MATLAB point-for-point parity.

re, im and wout are same-length double N-by-1 columns. One output returns re, two return re and im, and three add wout. A no-output call plots the positive-frequency curve and, for exactly real coefficients, mirrors the negative-frequency curve. Complex-coefficient models are evaluated without a mirrored curve. An exact denominator zero at a requested frequency produces an explicit singularity error.

Compatibility and placement

Native typed-integer frequency/model metadata, logical numeric roles, and GPU-resident consumed values are conservative RunMat-only extensions. Typed integers must be exactly representable in binary64 before complex frequency evaluation. Delayed transfer functions are not supported; nonzero input or output delay is rejected exactly rather than suppressed by a tolerance.

Frequency evaluation and output materialization run on the host. Valid consumed resident coefficient or frequency values gather through their owning provider only after host-known form, compatibility and structural checks; unrelated model properties are not read. The numeric output path has no UI effect; plotting needs the UI service. Calls may suspend and throw, but have no workspace, filesystem, network, callback, randomness or time effect.

Examples

Compute response data at explicit frequencies

H = tf(1, [1 1]); w = [0 1 2]; [re, im, wout] = nyquist(H, w); fprintf("%.1f %.1f %.1f %.1f\n", re(1), re(2), im(2), wout(3));

Expected output:

1.0 0.5 -0.5 2.0

Response of a sampled transfer function

H = tf(1, [1 -.5], .1); [re, im, w] = nyquist(H, [0 1]); fprintf("%.1f %.1f\n", re(1), im(1));

Expected output:

2.0 0.0

Plot a Nyquist diagram

H = tf(1, [1 2 1]); nyquist(H); fprintf("ok\n");

Expected output:

ok

Using nyquist with coding agents

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

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

FAQ

Does nyquist accept MIMO or state-space models?⌄

Not yet. The current implementation accepts scalar SISO tf objects.

Does nyquist run on a GPU?⌄

No. The calculation is host-side; admitted consumed resident input values gather through their owner.

Related Control functions

Response

bode · evalfr · freqresp · impulse · step

Analysis

care · ctrb · damp · db · dcgain · dlqr · feedback · isstable · lqr · minreal · pade · pole · pzmap · rlocus · stepinfo · zero

Models

series · ss2tf · tfdata

Control

ss · tf · tf.ldivide · tf.minus · tf.mldivide · tf.mpower · tf.mrdivide · tf.mtimes · tf.plus · tf.power · tf.rdivide · tf.times · tf.uminus · tf.uplus

Source you can read

Every RunMat function's source is public. Read exactly how nyquist is executed, line by line, in Rust.

  • View the source for nyquist in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/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.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Frequency grid and outputs
  • Compatibility and placement
  • Examples
  • Compute response data at explicit frequencies
  • Response of a sampled transfer function
  • Plot a Nyquist diagram
  • Using nyquist with coding agents
  • FAQ
  • Related Control functions
  • Response
  • Analysis
  • Models
  • Control
  • Source you can read
  • About RunMat