RunMat
GitHub

step — Compute or plot step responses of SISO transfer-function models with MATLAB-compatible step forms.

step(sys, ...) plots or returns sampled unit-step responses for supported SISO tf models, using MATLAB-compatible default-time and explicit-time call signatures.

Syntax

y = step(sys)
y = step(sys, tFinal)
y = step(sys, t)
[y,t] = step(sys)
[y,t] = step(sys, tFinal)
[y,t] = step(sys, t)

Inputs

NameTypeRequiredDefaultDescription
sysAnyYesSISO tf model.
timeAnyNoFinal time scalar or explicit time vector.

Returns

NameTypeDescription
yNumericArrayStep response samples (column vector).
tNumericArrayTime samples (column vector).

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

Errors

IdentifierWhenMessage
RunMat:step:InvalidArgumentInputs do not match supported step invocation forms.step: invalid argument
RunMat:step:InvalidModelInput system is not a supported tf object with valid required properties.step: invalid model
RunMat:step:InvalidTimeTime argument is invalid for the model class or sampling mode.step: invalid time input

How step works

  • Supports SISO tf objects with real coefficients.
  • Returns the response y as a column vector for single-output calls.
  • Returns [y, tOut] for two-output calls.
  • Plots the response for no-output calls.
  • No-output calls accept common multi-system plot syntax such as step(sys1, 'b', sys2, 'r--', tFinal); style tokens are accepted for compatibility.
  • Chooses an automatic time vector when no time input is supplied.
  • Accepts a positive finite scalar final time.
  • Accepts a finite, nonnegative, nondecreasing explicit time vector.
  • Discrete-time models use the stored Ts sample time.

GPU memory and residency

step computes on the host from tf metadata and returns host tensors.

Examples

Returning response data for a first-order system

sys = tf(1, [1 1]);
[y, t] = step(sys);

Expected output:

y and t are column vectors.

Using a scalar final time

sys = tf(1, [1 1]);
[y, t] = step(sys, 5);

Expected output:

t(end) = 5

Using an explicit time vector

sys = tf(1, [1 1]);
t = 0:0.5:2;
y = step(sys, t);

Expected output:

y is sampled at the values in t.

Plotting the step response

sys = tf(1, [1 1]);
step(sys);

Expected output:

A step-response plot is rendered.

Plotting multiple systems

s = tf('s');
H1 = 1/(s + 1);
H2 = 2/(s + 2);
step(H1, 'b', H2, 'r--', 5);

Expected output:

Both responses are plotted over the same final time.

How RunMat validates step

step validates object class, coefficient type, properness, sample time, and time-vector inputs before simulation. Unit and integration tests cover first-order response values, scalar final time, explicit vectors, discrete sample-time behavior, multi-output ordering, multi-system statement-form plotting syntax, and VM dispatch.

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

Using step with coding agents

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

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

FAQ

Does step support MIMO models?

Not yet. This implementation starts with SISO transfer-function objects.

Does step support state-space models?

Not yet. The initial implementation supports transfer-function objects produced by tf.

Can transfer-function coefficients be complex?

Not in this first implementation. Complex coefficients return a clear unsupported-input error.

db · dcgain · feedback · impulse · isstable · nyquist · pole · ss · stepinfo · tf

Open-source implementation

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

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.