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

series — Connect two supported dynamic-system models in series.

series(sys1,sys2) connects sys1 upstream of sys2. For transfer functions this is sys2*sys1; for state-space models the result retains the state-space representation and source-ordered dynamics.

Syntax

sys = series(sys1,sys2)
sys = series(sys1,sys2,out1,in2)
sys = series(sys1,sys2,'name')

Inputs

sys1
Type
Any
Required
Yes
Default
—
Description
Upstream tf or ss model.
sys2
Type
Any
Required
Yes
Default
—
Description
Downstream tf or ss model.
out1
Type
Any
Required
Yes
Default
—
Description
Distinct upstream output indices.
in2
Type
Any
Required
Yes
Default
—
Description
Distinct downstream input indices.
sys1
Type
Any
Required
Yes
Default
—
Description
Upstream model.
sys2
Type
Any
Required
Yes
Default
—
Description
Downstream model.
name
Type
StringScalar
Required
Yes
Default
—
Description
Match uniquely named output and input channels.
NameTypeRequiredDefaultDescription
sys1AnyYes—Upstream tf or ss model.
sys2AnyYes—Downstream tf or ss model.
out1AnyYes—Distinct upstream output indices.
in2AnyYes—Distinct downstream input indices.
sys1AnyYes—Upstream model.
sys2AnyYes—Downstream model.
nameStringScalarYes—Match uniquely named output and input channels.

Returns

sys
Type
Any
Description
Cascaded model, with sys1 upstream.
NameTypeDescription
sysAnyCascaded model, with sys1 upstream.

Errors

RunMat:series:InvalidArgument
When
Input or output form is invalid.
Message
series: invalid argument
RunMat:series:InvalidModel
When
Model matrices, channels, or sample times are incompatible.
Message
series: invalid model
RunMat:series:UnsupportedModel
When
The current model representation cannot express the requested interconnection.
Message
series: unsupported model
RunMat:series:Internal
When
Model result construction fails.
Message
series: internal error
IdentifierWhenMessage
RunMat:series:InvalidArgumentInput or output form is invalid.series: invalid argument
RunMat:series:InvalidModelModel matrices, channels, or sample times are incompatible.series: invalid model
RunMat:series:UnsupportedModelThe current model representation cannot express the requested interconnection.series: unsupported model
RunMat:series:InternalModel result construction fails.series: internal error

Models and channels

series(sys1,sys2,out1,in2) connects selected upstream outputs to selected downstream inputs. The distinct positive index vectors must have equal lengths; unconnected upstream outputs and downstream inputs are dropped. Direct tf-by-tf SISO composition retains a tf model; a composition involving an ss model produces an ss model.

series(sys1,sys2,'name') connects uniquely matching nonempty upstream OutputName and downstream InputName entries; it rejects duplicate or absent matches. Homogeneous nonempty tf/ss model arrays of equal shape connect corresponding entries; a scalar supported model may connect to each array entry. A real scalar gain scales every channel of a MIMO ss model. Sample times must match and nonzero delays are unsupported. Mixed tf/ss composition needs a proper real tf realization; complex or improper mixed models are currently unsupported. A scalar complex gain is supported for tf-by-tf SISO composition. Typed-integer scalar gains are a RunMat extension and round at the same binary64 model-arithmetic boundary as tf multiplication and feedback.

Execution

State-space composition is host-side matrix algebra. Required resident model properties are downloaded through their exact owners after validation; no GPU series kernel or fusion route is claimed. The call may suspend and may throw on invalid models or provider failures.

Examples

Cascade transfer functions

g1 = tf(2,[1 1]); g2 = tf([1 2],[1 3]); h = series(g1,g2);

Cascade state-space systems

g1 = ss(-1,1,1,0); g2 = ss(-2,1,1,0); h = series(g1,g2);

Connect a selected MIMO channel

g1 = ss(-1,[1 2],[3;4],[0 1;2 0]); g2 = ss(-2,[5 6],7,[8 9]); h = series(g1,g2,2,1);

Using series with coding agents

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

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

FAQ

Which model is upstream?⌄

sys1 is upstream. For SISO transfer functions, series(sys1,sys2) equals sys2*sys1.

Related Control functions

Models

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

  • View the source for series 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
  • Models and channels
  • Execution
  • Examples
  • Cascade transfer functions
  • Cascade state-space systems
  • Connect a selected MIMO channel
  • Using series with coding agents
  • FAQ
  • Related Control functions
  • Models
  • Response
  • Analysis
  • Control
  • Source you can read
  • About RunMat