RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

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.

LicensePrivacy
/
See all docs
Builtin Reference
    • damp
    • db
    • dcgain
    • feedback
    • impulse
    • isstable
    • lqr
    • nyquist
    • pole
    • pzmap
    • rlocus
    • ss
    • step
    • stepinfo
    • tf
    • zero

damp — Return natural frequencies, damping ratios, and poles for control models.

damp(sys) analyzes supported control models by deriving natural frequencies and damping ratios from their poles.

Syntax

wn = damp(sys)
[wn, zeta] = damp(sys)
[wn, zeta, p] = damp(sys)

Inputs

NameTypeRequiredDefaultDescription
sysAnyYes—SISO tf model or ss state-space model.

Returns

NameTypeDescription
wnNumericArrayNatural frequencies as an N-by-1 column vector.
zetaNumericArrayDamping ratios as an N-by-1 column vector.
pAnyModel poles as an N-by-1 real or complex column vector.

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

Errors

IdentifierWhenMessage
RunMat:damp:InvalidModelInput system is malformed or missing model metadata.damp: invalid model
RunMat:damp:UnsupportedModelModel class is unsupported.damp: unsupported model
RunMat:damp:OutputCountMore than three outputs are requested.damp: too many output arguments
RunMat:damp:InternalPole extraction or output construction failed.damp: internal error

How damp works

  • Supports SISO tf objects and ss state-space objects.
  • Returns wn and zeta as N x 1 real column vectors.
  • Returns poles as an N x 1 real vector when all poles are real, or an N x 1 complex vector when any pole has a nonzero imaginary part.
  • For continuous-time models, wn = abs(p) and zeta = -real(p) / wn.
  • For discrete-time models, damping metrics use the equivalent continuous pole log(p) / Ts, while the p output preserves the original discrete pole.
  • R2023b special-pole semantics are explicit: continuous zero and infinity have damping ratio -1; discrete zero has damping ratio +1, while discrete one and infinity have damping ratio -1.
  • Integer, logical, complex, and GPU arrays are not direct sys inputs. Numeric-class support belongs to the dynamic-system constructor before damp receives the model object.
  • Static-gain transfer functions return empty column vectors.

GPU memory and residency

damp returns host-resident vectors.

Example

Second-order transfer function

G = tf(1, [100 50 400]);
[wn, zeta, p] = damp(G)

Expected output:

wn contains values near 2, zeta contains values near 0.125, and p contains the complex pole pair.

How RunMat validates damp

damp validates model metadata, extracts poles from transfer-function denominators or state-space state matrices, and materializes MATLAB-style column outputs. Tests cover continuous and discrete transfer functions, state-space models, output counts, and descriptor metadata.

  • Implementation: `crates/runmat-runtime/src/builtins/control/damp.rs`

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

Using damp with coding agents

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

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

FAQ

Does damp cancel pole-zero pairs?⌄

No. For tf objects it analyzes the stored denominator polynomial.

Does damp support discrete-time systems?⌄

Yes. Natural frequency and damping ratio are computed from log(p) / Ts; the returned poles remain in the discrete domain.

Related Control functions

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

Open-source implementation

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

  • View the source for damp 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.

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
  • How damp works
  • GPU memory and residency
  • Example
  • Second-order transfer function
  • How RunMat validates damp
  • Using damp with coding agents
  • FAQ
  • Related Control functions
  • Open-source implementation
  • About RunMat