# MATLAB and Simulink R2026b for Coding Agents

Checked: **October 2, 2026**. Toolkits and MCP servers release independently of MATLAB; follow their current setup instructions and record versions.

## Resources

| Resource | Use |
| --- | --- |
| [MathWorks llms.txt](https://www.mathworks.com/llms.txt) | Products, documentation, learning, and community. |
| [Release notes llms.txt](https://www.mathworks.com/help/relnotes/llms.txt) | Product release notes in Markdown. |
| [MATLAB release notes (Markdown)][matlab-notes] | R2026b features and compatibility changes. |
| [Simulink release notes (Markdown)][simulink-notes] | R2026b modeling, simulation, data management, and code generation changes. |
| [MATLAB documentation](https://www.mathworks.com/help/matlab/index.html) and [Simulink documentation](https://www.mathworks.com/help/simulink/index.html) | APIs, blocks, syntax, examples, and product requirements. |
| [MATLAB GitHub projects](https://github.com/matlab) | Toolkits, MCP server, coding rules, and agent workflow examples. |

Follow index links and select **R2026b** in documentation and release notes. Current documentation changes with later releases. Resolve relative Markdown links against the source URL.

## Toolkits

| Toolkit | Use | Setup |
| --- | --- | --- |
| [MATLAB Agentic Toolkit](https://www.mathworks.com/products/matlab-agentic-toolkit.html) | Write, debug, analyze, test, and build MATLAB code and apps with MCP tools and skills. | [Quick start](https://github.com/matlab/matlab-agentic-toolkit) · [Skills](https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog) |
| [Simulink Agentic Toolkit](https://www.mathworks.com/products/simulink-agentic-toolkit.html) | Inspect, build, edit, simulate, and verify models with model-aware tools and Model-Based Design skills. | [Quick start](https://github.com/matlab/simulink-agentic-toolkit) · [Skills](https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog) |
| [Polyspace Agentic Toolkit](https://www.mathworks.com/products/polyspace-agentic-toolkit.html) | Analyze and test C/C++, including generated code, with installed Polyspace products. | [Separate setup](https://github.com/mathworks/polyspace-agentic-toolkit) |

Use licensed R2026b products required by the task. Toolkit minimums: MATLAB R2021a+; Simulink requires MATLAB R2023a+ and Simulink. `model_test` also requires Simulink Test. Check skill requirements for Stateflow, Simscape, System Composer, and code generation.

Polyspace setup is separate. Its quick start requires a supported Polyspace product R2025a+, Git, and a supported agent. Follow its repository instructions for product detection, MCP, and skills.

## Skills

Start with MATLAB Core, then select task-specific groups from the [skills catalog](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/README.md).

| Task | Skill | Group |
| --- | --- | --- |
| Install MATLAB, products, or support packages from the OS | [matlab-install-products][install-products] | MATLAB Core |
| Inventory products and support packages without starting MATLAB | [matlab-list-products](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-list-products/SKILL.md) | MATLAB Core |
| Discover APIs and release-specific documentation | [matlab-read-documentation](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-read-documentation/SKILL.md) | MATLAB Core |
| Create/edit plain text live scripts, convert `.mlx`, and verify embedded output | [matlab-create-live-script][live-script] | MATLAB Core |
| Diagnose errors or unexpected behavior | [matlab-debug-code](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-debug-code/SKILL.md) | MATLAB Core |
| Review correctness, maintainability, and MATLAB idioms | [matlab-review-code](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-review-code/SKILL.md) | MATLAB Core |
| Build apps, including R2026b `.m`/`.xml` pairs | [matlab-build-app][build-app] | MATLAB App Building |
| Write unit and UI tests | [matlab-write-tests](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-software-development/matlab-write-tests/SKILL.md) | MATLAB Software Development |
| Run/filter tests, analyze results, configure coverage and CI | [matlab-run-tests](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-software-development/matlab-run-tests/SKILL.md) | MATLAB Software Development |
| Replace removed or discouraged APIs | [matlab-modernize-code](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-software-development/matlab-modernize-code/SKILL.md) | MATLAB Software Development |

Read each installed `SKILL.md` and `manifest.yaml` for release, product, tool, and skill dependencies. Retain supporting references and scripts. Bundled MATLAB helpers need their `scripts` directory on the MATLAB path; they are not built-ins or separate MCP tools. The catalog also covers data analysis, performance, code generation, control, signal processing, optimization, and robotics.

For documentation, use `help` for known functions or the documentation skill's `get_local_function_list` helper to discover installed functions. Read user guides for workflows and reference pages for syntax and constraints. Its `fetch_product_index` helper defaults to the installed release; select R2026b explicitly from another release's session. Follow returned URLs rather than guessing them.

## Setup

### 1. Install MATLAB

If MATLAB is missing, use [Install MathWorks Products](https://www.mathworks.com/help/install/ug/install-products-with-internet-connection.html) or [matlab-install-products][install-products]. The skill uses [MATLAB Package Manager (`mpm`)](https://www.mathworks.com/help/install/ug/get-mpm-os-command-line.html) from the OS for product selection, installation, and verification. Select R2026b and required products; see [`mpm install`](https://www.mathworks.com/help/install/ug/mpminstall.html). License activation is separate.

[Add skills without MATLAB or MCP](https://github.com/matlab/matlab-agentic-toolkit/blob/main/Configuration_and_Troubleshooting.md#adding-skills-only) to use the installation skill before MATLAB is installed.

### 2. Install the agent integration

Download **agenticToolkitInstaller.mltbx** from the [latest release](https://github.com/matlab/simulink-agentic-toolkit/releases/latest). It supports both MATLAB and Simulink toolkits. Open it in MATLAB, or install programmatically with [`mpminstall`](https://www.mathworks.com/help/matlab/ref/mpminstall.html):

```matlab
mpminstall("/absolute/path/to/agenticToolkitInstaller.mltbx")
```

Then configure the integration:

```matlab
setupAgenticToolkit("install")
```

Select agent, configuration scope, and skill groups: MATLAB Core for MATLAB; Model-Based Design Core for Simulink; additional groups as needed. Check available tools and skills; reload the agent if required.

[Toolkit setup][toolkit-setup] covers offline installation, skills-only setup, and platform configuration. For offline setup, supply local artifacts and set `Offline=true`.

### 3. Connect the session

For MATLAB-only work, share the intended running session:

```matlab
shareMATLABSession()
```

For Simulink, initialize once per MATLAB session. Following [MATLAB Setup](https://github.com/matlab/simulink-agentic-toolkit#matlab-setup), the default paths are:

```matlab
if ispc
    addpath(fullfile(getenv('USERPROFILE'), '.matlab', 'agentic-toolkits', 'simulink'))
else
    addpath("~/.matlab/agentic-toolkits/simulink")
end
satk_initialize
```

Initialization shares the session and validates installation. Adjust custom paths.

For [manual MCP setup](https://github.com/matlab/matlab-mcp-server#setup), new-session mode needs `--matlab-root` pointing to R2026b's root, excluding `bin`, and `--initial-working-folder` pointing to the project. In `existing` mode, share the session and omit both arguments.

### 4. Verify the environment

Use `detect_matlab_toolboxes`, then `evaluate_matlab_code` in the project directory:

```matlab
releaseInfo = matlabRelease;
assert(releaseInfo.Release == "R2026b", "This task requires MATLAB R2026b.")
disp(releaseInfo)
disp(matlabroot)
disp(pwd)
ver
assert(isequal(eye(2) * [1; 2], [1; 2]))
```

[`matlabRelease`](https://www.mathworks.com/help/matlab/ref/matlabrelease.html) identifies the release/update. Record root, working folder, and product versions. Installed products do not guarantee available licenses; test a capability the task requires.

For Simulink, follow [verification](https://github.com/matlab/simulink-agentic-toolkit#verify) and inspect a model with `model_overview`.

## R2026b changes

### Plain text App Designer apps

App Designer supports paired `.m` code and `.xml` configuration files for external editing and source control. Keep both files and preserve `AppConfigFilename`. Convert existing apps with **Save As** or **Save Copy As** → **MATLAB App (*.m)**.

App Designer is the recommended editor. Direct code edits should use editable Code View sections. External layout, callback, or UI-property changes can cause incompatible code to be removed on loading. Verify the app opens and runs. Plain text format excludes apps for Simulink models and custom UI components.

See [App Designer File Formats](https://www.mathworks.com/help/matlab/creating_guis/app-designer-file-formats.html) and [Plain-Text MATLAB Apps in R2026b](https://blogs.mathworks.com/graphics-and-apps/2026/09/28/plain-text-matlab-apps-in-r2026b-a-diff-you-can-read/).

To build an app, use [matlab-build-app][build-app]. Read its [shared guide](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-app-building/matlab-build-app/references/app-designer/agent-guide-shared.md) and [plain text guide](https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-app-building/matlab-build-app/references/app-designer/agent-guide-plaintext.md) for the helper workflow, coordinated XML/code changes, and validation on save. Test behavior as well as file structure.

### Plain text live scripts by default

Live scripts and live functions default to `.m` in R2026b; plain text support began in R2025a. Use [matlab-create-live-script][live-script] and [Live Code File Formats](https://www.mathworks.com/help/matlab/matlab_prog/file-format-for-live-scripts.html).

Preserve the skill's formatting and validate code before optionally embedding outputs with its `executeLiveScript` helper. Export for visual inspection. Embedded runtime errors can be saved in the appendix without throwing exceptions; inspect output for errors. Re-read the file after embedding because MATLAB rewrites it.

### Simulink inspection and review

- Data dictionaries support uncompressed JSON with the `.sldd` extension; binary remains the default. Use dictionary APIs and MATLAB Comparison Tool for edits/merges; standard text merges are not recommended.
- Model view settings are stored outside the model by default, reducing zoom/window changes in model files.
- `visdiff` exposes model comparisons through a `Result` property; filters can be managed programmatically.

See **Project and File Management** and **Data Management** in the [R2026b Simulink release notes][simulink-notes].

### Environment and output

- Java Runtime is no longer bundled on Windows/Linux. Check [supported OpenJDK versions](https://www.mathworks.com/support/requirements/openjdk.html) for Java-dependent workflows.
- The Add-Ons panel replaces Add-On Manager. Prefer `mpminstall`, `mpmuninstall`, and `mpmlist` over older `matlab.addons` workflows.
- Command Window output can truncate large numeric matrices. Validate sizes, selected values, numerical summaries, or saved artifacts.

See **Environment** in the [R2026b MATLAB release notes][matlab-notes] or [HTML notes](https://www.mathworks.com/help/matlab/release-notes.html#mw_27630ed6-9755-4773-84ef-559f2a02ee7a).

## Execute and verify

See [MCP tool schemas](https://github.com/matlab/matlab-mcp-server#tools); use absolute file/project paths.

| Tool | Use |
| --- | --- |
| `detect_matlab_toolboxes` | Inspect MATLAB and toolbox versions. |
| `evaluate_matlab_code` | Execute statements in a project directory. |
| `run_matlab_file` | Run a saved script. |
| `check_matlab_code` | Run Code Analyzer. |
| `run_matlab_test_file` | Run a unit test file and inspect results. |

Use [MCP resources](https://github.com/matlab/matlab-mcp-server#resources) `matlab_coding_guidelines` and `plain_text_live_code_guidelines`, and the [MATLAB AI coding rules](https://github.com/matlab/rules), as needed.

1. Read repository instructions and setup. Use [`openProject`](https://www.mathworks.com/help/matlab/ref/openproject.html) for MATLAB projects. Identify dependencies, tests, inputs, and expected outputs.
2. Verify APIs/blocks in R2026b documentation and the installed environment.
3. Make a small change; run static analysis and focused tests. Compare numerical results and artifacts with acceptance criteria.
4. For Simulink, inspect hierarchy/parameters, then edit with toolkit tools or supported APIs. Run `model_check` and `model_read_diagnostics`, compile, and simulate. Structural checks alone do not verify behavior.
5. Use [`Simulink.SimulationInput`](https://www.mathworks.com/help/simulink/slref/simulink.simulationinput.html) for repeatable inputs/settings. Record solver, sample times, stop time, inputs, and signal tolerances; compare logged outputs with a baseline or expected results.
6. Report checks, results, remaining checks, environment, and output files.

### Batch and CI

Use the R2026b executable with `-batch`. From the repository root, after project/path setup, this example runs a `tests` directory:

```sh
matlab -batch "assert(strcmp(version('-release'),'2026b')); results = runtests('tests',IncludeSubfolders=true); assert(~isempty(results),'No tests were discovered.'); assertSuccess(results)"
```

Adapt test paths and define how to handle skipped or incomplete tests. See [startup options](https://www.mathworks.com/help/matlab/ref/matlabwindows.html), [`runtests`](https://www.mathworks.com/help/matlab/ref/runtests.html), and [`TestResult`](https://www.mathworks.com/help/matlab/ref/matlab.unittest.testresult-class.html). For GitHub Actions, use [setup-matlab](https://github.com/matlab-actions/setup-matlab) and [run-tests](https://github.com/matlab-actions/run-tests), selecting R2026b and required products.

## Discussion and support

| Need | Channel |
| --- | --- |
| Discuss agentic AI workflows and share examples | [MATLAB Central Agentic AI Discussions](https://www.mathworks.com/matlabcentral/discussions/ai) |
| MATLAB/Simulink programming questions | [MATLAB Answers](https://www.mathworks.com/matlabcentral/answers/) |
| MCP connection/execution issues | [MATLAB MCP Server issues](https://github.com/matlab/matlab-mcp-server/issues) |
| MATLAB toolkit setup/skills issues | [MATLAB Agentic Toolkit issues](https://github.com/matlab/matlab-agentic-toolkit/issues) |
| Simulink toolkit tools/skills issues | [Simulink Agentic Toolkit issues](https://github.com/matlab/simulink-agentic-toolkit/issues) |
| Polyspace integration issues | [Polyspace Agentic Toolkit issues](https://github.com/mathworks/polyspace-agentic-toolkit/issues) |
| Installation, licensing, product errors, crashes, support cases | [MathWorks Support](https://www.mathworks.com/support/contact_us.html) |

For setup failures, start with [troubleshooting][toolkit-setup]: startup, licenses, offline artifacts, timeouts, and Windows configuration.

Search existing issues before escalating. Include a minimal reproduction with:

- MATLAB release/update, products, OS, and architecture.
- Agent, MCP, and toolkit versions; configuration with credentials removed.
- Commands/tool calls, error IDs/messages, logs, and expected/actual behavior.
- A shareable script/model and whether it fails directly in MATLAB or only through the agent.

The Simulink [bug-report workflow](https://github.com/matlab/simulink-agentic-toolkit#report-bugs) collects diagnostics in the affected session. Use private support for proprietary models or sensitive logs.

## Starter prompt

```text
Use MATLAB and Simulink R2026b. Read repository instructions and
https://mathworks.github.io/releases/R2026b.md
Use the linked llms.txt indexes, matlab-read-documentation, and task-specific skills.
Confirm release/update, working folder, required products, and supported APIs.
Identify setup, tests, and acceptance criteria; implement and run static analysis/tests.
For models, compile, simulate, and compare logged outputs with expected behavior.
Report changes, checks/results, artifacts, and blockers.
```

[matlab-notes]: https://www.mathworks.com/help/matlab/release-notes.md
[simulink-notes]: https://www.mathworks.com/help/simulink/release-notes.md
[install-products]: https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-install-products/SKILL.md
[live-script]: https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-core/matlab-create-live-script/SKILL.md
[build-app]: https://github.com/matlab/matlab-agentic-toolkit/blob/main/skills-catalog/matlab-app-building/matlab-build-app/SKILL.md
[toolkit-setup]: https://github.com/matlab/matlab-agentic-toolkit/blob/main/Configuration_and_Troubleshooting.md
