stepinfo — Compute step-response metrics from SISO models or sampled responses.
stepinfo(sys) simulates the step response for a supported SISO tf model and returns response metrics. stepinfo(y, t, yfinal) computes metrics from sampled response data.
Syntax
info = stepinfo(sys)
info = stepinfo(y, t)
info = stepinfo(y, t, yfinal)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
sys | Any | Yes | — | SISO tf model. |
y | NumericArray | Yes | — | Response samples. |
t | NumericArray | No | — | Time samples. |
yfinal | NumericScalar | No | — | Steady-state value. |
Returns
| Name | Type | Description |
|---|---|---|
info | Any | Step-response metrics struct. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:stepinfo:InvalidArgument | Inputs do not match supported stepinfo invocation forms. | stepinfo: invalid argument |
RunMat:stepinfo:InvalidData | Response, time, or final-value data is malformed. | stepinfo: invalid response data |
RunMat:stepinfo:InvalidSystem | System input is not a supported SISO tf object. | stepinfo: invalid system |
RunMat:stepinfo:UnsupportedModel | System model form is unsupported. | stepinfo: unsupported model |
RunMat:stepinfo:Internal | Response simulation or metric assembly failed. | stepinfo: internal error |
How stepinfo works
- Supports
stepinfo(sys)for SISOtfmodels supported bystep. - Supports sampled forms
stepinfo(y),stepinfo(y, t), andstepinfo(y, t, yfinal). - Returns a struct with
RiseTime,TransientTime,SettlingTime,SettlingMin,SettlingMax,Overshoot,Undershoot,Peak,PeakTime, andSteadyStateValue. - Uses a default settling-time threshold of 2%.
- Accepts the name-value option
'SettlingTimeThreshold'with a scalar value between 0 and 1. - Rise-time crossings are linearly interpolated between adjacent samples.
GPU memory and residency
stepinfo returns a host struct.
Examples
Metrics from a transfer function
s = tf('s');
T = feedback(2/(s + 1), 1);
info = stepinfo(T);
info.OvershootExpected output:
ans = 0Metrics from sampled data
t = 0:0.1:5;
y = 1 - exp(-t);
info = stepinfo(y, t, 1);
info.SteadyStateValueExpected output:
ans = 1How RunMat validates stepinfo
stepinfo validates system inputs, sampled data shape, finite values, time ordering, final value, and settling-threshold options. Tests cover sampled metrics, system metrics through step and dcgain, and VM control workflows.
- Implementation: `crates/runmat-runtime/src/builtins/control/stepinfo.rs`
See Correctness & Trust for the full methodology and coverage table.
Using stepinfo with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how stepinfo changes the result.
Run a small stepinfo example, explain the result, then change one input and compare the output.
FAQ
Does stepinfo require a transfer-function model?⌄
No. It can also operate on sampled response vectors.
Are the metrics exact analytical values?⌄
For model inputs, metrics are computed from the sampled step response. Crossings are linearly interpolated from those samples.
Related Control functions
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how stepinfo is executed, line by line, in Rust.
- View the source for stepinfo 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.