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

tfdata — Extract transfer-function numerator, denominator and sample time from a control model.

[num,den,Ts] = tfdata(sys) returns coefficient cells and sample time. A state-space MIMO model yields an output-by-input coefficient cell grid. A homogeneous model array adds its model dimensions after the output and input dimensions; scalar indices select one array entry. For a scalar SISO model, 'v' returns coefficient row vectors instead of cells.

Syntax

[num,den,ts,sdnum,sdden] = tfdata(sys)
[num,den] = tfdata(sys,'v')
[num,den] = tfdata(sys,J1,...,JN)

Inputs

sys
Type
Any
Required
Yes
Default
—
Description
Scalar tf or ss model, or a homogeneous tf/ss model array.
sys
Type
Any
Required
Yes
Default
—
Description
SISO tf or ss model.
v
Type
StringScalar
Required
Yes
Default
—
Description
Vector output selector.
sys
Type
Any
Required
Yes
Default
—
Description
Homogeneous tf or ss model array.
J1,...,JN
Type
NumericScalar
Required
Variadic
Default
—
Description
Positive scalar model-array indices in column-major order.
NameTypeRequiredDefaultDescription
sysAnyYes—Scalar tf or ss model, or a homogeneous tf/ss model array.
sysAnyYes—SISO tf or ss model.
vStringScalarYes—Vector output selector.
sysAnyYes—Homogeneous tf or ss model array.
J1,...,JNNumericScalarVariadic—Positive scalar model-array indices in column-major order.

Returns

num
Type
Any
Description
Numerator coefficient cell or row vector.
den
Type
Any
Description
Denominator coefficient cell or row vector.
ts
Type
NumericScalar
Description
Sample time.
sdnum
Type
Any
Description
Empty uncertainty for a deterministic model.
sdden
Type
Any
Description
Empty uncertainty for a deterministic model.
NameTypeDescription
numAnyNumerator coefficient cell or row vector.
denAnyDenominator coefficient cell or row vector.
tsNumericScalarSample time.
sdnumAnyEmpty uncertainty for a deterministic model.
sddenAnyEmpty uncertainty for a deterministic model.

Errors

RunMat:tfdata:InvalidArgument
When
Input selector or requested output count is invalid.
Message
tfdata: invalid argument
RunMat:tfdata:InvalidModel
When
Consumed model properties are malformed.
Message
tfdata: invalid model
RunMat:tfdata:UnsupportedModel
When
Model representation is not supported.
Message
tfdata: unsupported model
RunMat:tfdata:Internal
When
Coefficient output construction fails.
Message
tfdata: internal error
IdentifierWhenMessage
RunMat:tfdata:InvalidArgumentInput selector or requested output count is invalid.tfdata: invalid argument
RunMat:tfdata:InvalidModelConsumed model properties are malformed.tfdata: invalid model
RunMat:tfdata:UnsupportedModelModel representation is not supported.tfdata: unsupported model
RunMat:tfdata:InternalCoefficient output construction fails.tfdata: internal error

Results

Scalar tf or ss models and nonempty homogeneous arrays of those models are accepted. Without the vector selector, numerator and denominator are output-by-input cells containing coefficient row vectors (1-by-1 for scalar SISO). An array returns cell pages in column-major model order. The optional third output is the common sample time; fourth and fifth uncertainty outputs are empty for deterministic models.

Positive scalar indices in tfdata(sys,J1,...,JN) select one model-array entry; one index uses column-major linear order. The vector selector tfdata(sys,'v') applies only to a scalar SISO model. State-space conversion uses the shared characteristic/Markov polynomial owner; empty arrays, zpk, and uncertain models remain unsupported.

Placement

Accepted resident model properties are gathered through their exact provider owner. The output is host-side coefficient data; no GPU coefficient kernel is claimed.

Examples

Read SISO coefficient vectors

G = tf([2 4],[1 3]); [n,d] = tfdata(G,'v');

Read a MIMO coefficient grid

G = ss(-2,[1 3],[1;2],[0 1;0 2]); [n,d,ts] = tfdata(G);

Using tfdata with coding agents

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

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

FAQ

When are cells returned?⌄

Without the SISO 'v' selector, coefficient outputs are cell arrays.

Related Control functions

Models

series · ss2tf

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

  • View the source for tfdata 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
  • Results
  • Placement
  • Examples
  • Read SISO coefficient vectors
  • Read a MIMO coefficient grid
  • Using tfdata with coding agents
  • FAQ
  • Related Control functions
  • Models
  • Response
  • Analysis
  • Control
  • Source you can read
  • About RunMat