# Simulink Linearize

Linearize Simulink models.

- Repository: https://github.com/matlab/simulink-agentic-toolkit (1305 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -g -a claude-code -y`
Codex: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -g -a codex -y`
Cursor: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -g -a cursor -y`
Gemini CLI: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add matlab/simulink-agentic-toolkit`

## Description

Linearize Simulink models. Use when obtaining linear time invariant or linear parameter varying models from Simulink models.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Simulink Linearization

Extract linear time invariant (LTI) or linear parameter varying (LPV) models from Simulink using `linearize` and related APIs from Simulink Control Design.

## When to Use

- Obtaining a linear model (tf, ss, zpk) from a Simulink model
- Batch linearization across operating points and parameter variations
- Building LPV models with `ssInterpolant`
- Debugging linearization results (zero gain, unexpected dynamics)
- Extracting multiple LTI systems with a single model compile

## When NOT to Use

- Frequency response estimation from simulation, use `simulink-frequency-response` for frestimate-based fallback
- No Simulink model is involved

## Workflow

The linearization pipeline has four stages. Not every task requires all stages.

```
1. Define I/O Points 2. Operating Point  →  3. Linearize  →  4. Debug  
    (root level/linio)   (findop/operspec)     (linearize)     (advisor) 
```

### Stage 1: Define Linearization I/O Points

Determine I/O points using this decision sequence. Use the first case that applies:

**Case A, IO points can be inferred from prompt or model context:**

Use the first sub-case that matches:

1. **User specifies explicit I/O signals or blocks** (e.g., "from r to y") → define `linio` points. All `linio` points must reference a block's output port. If a candidate block has no output ports (Outport, Terminator, Scope) → trace upstream to find the source block and port with `model_read`.
   ```matlab
   io = [linio(sprintf("%s/InputBlock", mdl), 1, "input"); ...
         linio(sprintf("%s/OutputBlock", mdl), 1, "output")];
   ```

2. **User targets a specific block or subsystem** (e.g., "linearize the Controller") → Use the block path as the io argument signaling linearize to perform open-loop linearization of the block

   ```matlab
   io = sprintf("%s/Controller", mdl);
   ```

3. **Model has existing linearization points** → `io = getlinio(mdl);`, use if non-empty.

The rest: https://github.com/matlab/simulink-agentic-toolkit/blob/HEAD/skills-catalog/control-systems/simulink-linearize/SKILL.md
