Matlab Model ViaSAFE
The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.
Overview
The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.
58967e6f32b5OBSERVED · 2026-10-14What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: matlab-model-via
description: "Via modeling: pads, antipads, ground return vias, GRV placement, and signal integrity for high-speed layer transitions. TRIGGER: user asks to model a via, design a via transition, place ground return vias, analyze via performance, or check signal integrity through layer transitions. Invoke BEFORE writing code — only viaSingleEnded exists (no viaDifferential), and the location format is non-obvious. SKIP: general signal integrity without vias (use matlab-analyze-em), transmission line design (use matlab-design-pcb-transmission-line), PDN analysis (use matlab-analyze-pcb-pdn), material/stackup setup only (use matlab-manage-pcb-material)."
license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md
metadata:
author: MathWorks
version: "1.0"
---
# Modeling Vias
## When to Use
- Modeling signal vias through multi-layer PCB stackups (viaSingleEnded)
- Configuring pad and antipad geometry per layer
- Placing ground return vias for signal integrity
- Analyzing via S-parameters and identifying barrel resonances
- Evaluating GRV placement with criticalwavelength and gapratedistance
## When NOT to Use
- Designing transmission lines or impedance control — use `matlab-design-pcb-transmission-line`
- Building custom PCB structures from shapes — use `matlab-assemble-pcb-layout`
- Setting up substrate or conductor materials — use `matlab-manage-pcb-material`
- Running full-wave EM analysis on non-via structures — use `matlab-analyze-em`
- PDN analysis on imported boards — use `matlab-analyze-pcb-pdn`
## Typical Workflow
1. **Before:** `matlab-manage-pcb-material` — set up substrate and conductor for the stackup
2. **This skill:** Model the via, place GRVs, check signal integrity
3. **After:** `matlab-integrate-pcb-circuit` — cascade via model with trace/connector models → `matlab-optimize-pcb-design` — optimize GRV placement or pad geometry
## Quick Reference
| Task | Code |
|------|------|
| Create via | `via = viaSingleEnded` |
| Set signal layers | `via.SignalLayer = [1 5]` |
| Set ground layers | `via.GroundLayer = [3 7 9]` |
| Set substrate | `via.Substrate = dielectric(...)` |
| Place signal via | `via.SignalViaLocations = [x y startLayer stopLayer]` |
| Place ground return vias | `via.GroundReturnViaLocations = [x y start stop; ...]` |
| Define ports | `via.SignalTable = {viaNum layer traceWidth direction; ...}` |
| View pads | `padsTable(via)` |
| View antipads | `antipadsTable(via)` |
| Customize pads | `pads = getpads(via); pads{k}.Radius = r; via.SignalViaPad = pads` |
| Customize antipads | `ap = getantipads(via); ap{k}.Radius = r; via.SignalViaAntipad = ap` |
| Visualize | `show(via)` |
| S-parameters | `sp = sparameters(via, freq)` |
| Resonance risk check | `cw = criticalwavelength(via, freq)` |
| Max GRV distance | `gapratedistance(via, freq)` |
## viaSingleEnded Object
The `viaSingleEnded` object models signal vias through multi-layer PCB stackups with configurable pads, antipads, and ground return vias.
### Basic Setup
```matlab
via = viaSingleEnded;
via.SignalLayer = [1 5];
via.GroundLayer = [3 7 9];
via.Substrate = dielectric("Name","FR4","EpsilonR",4.8,...
"LossTangent",0.026,"Thickness",1.27e-4,"Frequency",1e8);
via.Conductor = metal("Copper");
show(via);
```
### Key Properties
| Property | Format | Description |
|----------|--------|-------------|
| `SignalLayer` | Vector | Layer indices where signal traces connect (odd numbers) |
| `GroundLayer` | Vector | Layer indices for ground/return planes |
| `Substrate` | dielectric | Dielectric between layers |
| `Conductor` | metal | Via barrel and pad conductor |
| `SignalViaLocations` | N×4 matrix | `[x, y, startLayer, stopLayer]` per via |
| `SignalViaDiameter` | Scalar (m) | Via barrel diameter |
| `SignalViaFinishedDiameter` | Scalar (m) | Finished hole diameter (after plating) |
| `SignalViaPad` | Shape or cell | Pad shape(s) on signal via |
| `SignalViaAntipad` | Shape or cell | Antipad (clearance) shape(s) |
| `RemoveUnusedPads` | Logical | Remove pads on non-signal layers (default: true) |
| `GroundReturnViaLocations` | M×4 matrix | `[x, y, startLayer, stopLayer]` per GRV |
| `GroundReturnViaDiameter` | Scalar or vector | GRV barrel diameter |
| `GroundReturnViaFinishedDiameter` | Scalar or vector | GRV finished hole diameter |
| `SignalTable` | Cell array | Port definitions: `{viaNum, layer, traceWidth, direction}` |
## Signal Via Configuration
### Placing a Signal Via
```matlab
via = viaSingleEnded;
via.SignalLayer = [1 5];
via.GroundLayer = [3 7 9];
X = 0; Y = 0;
startLayer = 1;
stopLayer = 7;
via.SignalViaLocations = [X Y startLayer stopLayer];
```
The via barrel spans from `startLayer` to `stopLayer`. Signal connections occur on layers listed in `SignalLayer` that fall within this range.
### Via Diameter
```matlab
via.SignalViaDiameter = 0.25e-3; % Drill diameter
via.SignalViaFinishedDiameter = 0.20e-3; % After copper plating
```
### Unit Conversion Helper
The object provides a built-in mils-to-meters conversion:
```matlab
via.SignalViaDiameter = 10 * via.mils2meters; % 10 mils
```
## Port Definition (SignalTable)
The `SignalTable` property defines which layers become ports for S-parameter extraction.
### Format
Each row: `{signalViaNumber, layerIndex, traceWidth, direction}`
- `signalViaNumber`: Which signal via (1-based index into `SignalViaLocations`)
- `layerIndex`: The layer where the port is placed
- `traceWidth`: Width of the connecting trace (meters)
- `direction`: Angle in degrees (0 = +x direction, 90 = +y, etc.)
### Example: Two-Port Via
```matlab
via.SignalTable = {1, 1, 3e-4, 45; % Port 1: via 1, layer 1, 0.3mm trace, 45 deg
1, 5, 3e-4, 0}; % Port 2: via 1, layer 5, 0.3mm trace, 0 deg
```
### Using Table Syntax for Clarity
```matlab
vPorts = table('Size', [2 4], ...
'VariableTypes', ["cell","cell","cell","cell"], ...
'VariableNames', ["Signal Via Num","Layer","TraceTrust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
58967e6f32b5full audit observations/trust-audit/skill/matlab__matlab-model-via.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-14 | 58967e6f32b5 | SAFE | B | 89 | first audit |
Questions
What does the Matlab Model Via skill do?
The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.
Is Matlab Model Via safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Matlab Model Via access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (58967e6f32b5), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.