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.1, Nov 17, 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
    • series
    • ss2tf
    • tfdata

ss2tf — Convert real state-space matrices to transfer-function coefficients for a selected input.

[b,a] = ss2tf(A,B,C,D,ni) returns one numerator row for each output and one common denominator row. ni is one-based and defaults to 1. Matrix dimensions must form a valid state-space system.

Syntax

[b,a] = ss2tf(A,B,C,D)
[b,a] = ss2tf(A,B,C,D,ni)

Inputs

A
Type
Any
Required
Yes
Default
—
Description
State matrix.
B
Type
Any
Required
Yes
Default
—
Description
Input matrix.
C
Type
Any
Required
Yes
Default
—
Description
Output matrix.
D
Type
Any
Required
Yes
Default
—
Description
Feedthrough matrix.
ni
Type
NumericScalar
Required
Yes
Default
—
Description
One-based input channel index.
NameTypeRequiredDefaultDescription
AAnyYes—State matrix.
BAnyYes—Input matrix.
CAnyYes—Output matrix.
DAnyYes—Feedthrough matrix.
niNumericScalarYes—One-based input channel index.

Returns

b
Type
Any
Description
One numerator row per output channel.
a
Type
Any
Description
Common denominator row.
NameTypeDescription
bAnyOne numerator row per output channel.
aAnyCommon denominator row.

Errors

RunMat:ss2tf:InvalidArgument
When
Input index, class, or output form is invalid.
Message
ss2tf: invalid argument
RunMat:ss2tf:InvalidModel
When
State-space dimensions are incompatible.
Message
ss2tf: invalid model
RunMat:ss2tf:UnsupportedModel
When
A requested model form is unsupported.
Message
ss2tf: unsupported model
RunMat:ss2tf:Internal
When
Polynomial result construction fails.
Message
ss2tf: internal error
IdentifierWhenMessage
RunMat:ss2tf:InvalidArgumentInput index, class, or output form is invalid.ss2tf: invalid argument
RunMat:ss2tf:InvalidModelState-space dimensions are incompatible.ss2tf: invalid model
RunMat:ss2tf:UnsupportedModelA requested model form is unsupported.ss2tf: unsupported model
RunMat:ss2tf:InternalPolynomial result construction fails.ss2tf: internal error

Selected input

For A of order n and q output rows in C, b is q-by-(n+1) and a is 1-by-(n+1). Each b row preserves the characteristic-polynomial order, including leading zero coefficients. The selected column of B and D corresponds to ni; all q outputs are returned.

Inputs must be finite real Single or Double scalars or dense matrices. All-Single inputs produce Single coefficients; otherwise coefficients are Double. Explicit resident inputs are read through their owning provider and results are host values, not resident results.

Current boundaries

Complex, sparse, distributed and integer matrix inputs are not admitted by this matrix form. The conversion uses characteristic and Markov polynomial operations on the host; large synchronous numerical work and a managed finite allocation envelope remain qualification obligations.

Example

Choose one input of a two-input system

A = -2; B = [1 3]; C = [1; 2]; D = [0 1; 0 2]; [b,a] = ss2tf(A,B,C,D,2);

Using ss2tf with coding agents

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

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

FAQ

What does ni select?⌄

The one-based input channel of B and D. It defaults to channel 1.

Related Control functions

Models

series · tfdata

Response

bode · evalfr · freqresp · impulse · nyquist · step

Analysis

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

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 ss2tf is executed, line by line, in Rust.

  • View the source for ss2tf 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
  • Selected input
  • Current boundaries
  • Example
  • Choose one input of a two-input system
  • Using ss2tf with coding agents
  • FAQ
  • Related Control functions
  • Models
  • Response
  • Analysis
  • Control
  • Source you can read
  • About RunMat