matlab-analyze-em
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pc
npx skills add matlab/matlab-agentic-toolkit --skill matlab-analyze-em --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Explains that the skill handles S-parameters extraction, MoM vs FEM solver comparison, mesh control, field and current visualization, and behavioral (analytic) S-parameter models for RF PCB components. It outlines the triggers and workflow for obtaining S-parameters, choosing solvers, and inspecting meshes and memory, with steps to visualize fields and currents and to proceed to optimization or circuit integration.
How it works
The skill provides procedural guidance for:
- Extracting S-parameters from RF PCB components using MATLAB syntax (e.g., sparameters(obj, freq, ...)) and plotting results (rfplot).
- Choosing and switching solvers between MoM and FEM, including configuring pcbComponent objects (e.g., pcb.SolverType = 'FEM') and accessing the solver via solver(pcb) to set BoundaryCondition.
- Interpolating sweeps and frequencySweep objects for faster multi-frequency analysis, and extracting rational models when needed.
- Controlling and inspecting mesh density with mesh and meshconfig, including pre-solve memory checks and mesh coarsening guidance.
- Visualizing E/H fields, surface currents, charge distributions, and current distributions with EHfields, current, and charge functions, including near-field grids and observation planes.
- Using behavioral S-parameter models for fast estimates, with syntax for Behavioral=true in sparameters and examples for catalog and pcbComponent objects.
It also enumerates prerequisites for FEM (IDMF, WSL), FEM-related constraints (PEC only, connector spacing), and differences between MoM and FEM results.
When to use it
Use when you need:
- Extraction of S-parameters from RF PCB components
- Comparison of MoM vs FEM solvers or selection of the appropriate solver
- Visualization of fields, currents, and charge distributions
- Mesh density control for accuracy vs speed, and pre-solve memory checks
- Implementation of fast analytic models via Behavioral S-parameters for rapid exploration or optimization
What it can touch
This skill references and instructs use of:
- MATLAB functions and objects such as sparameters, rfplot, EHfields, current, charge, feedCurrent, mesh, meshconfig, memoryEstimate, frequencySweep, and solver via pcbComponent and solver(pcb)
- Solver switching using pcbComponent.SolverType = 'FEM' and solver(pcb) to configure BoundaryCondition
- Behavioral modeling through sparameters with Behavioral=true
Caveats
Notes reference dependencies and constraints for FEM:
- FEM prerequisites include Integro-Differential Modeling Framework for MATLAB and Windows Subsystem for Linux on Windows.
- FEM requires PEC conductivity; finite conductivity metals will error.
- Some FEM properties are available on pcbComponent (e.g., Connector, IsShielded); certain methods like getZEven/getZOdd are not available with FEM.
- Firewall and Windows configuration specifics may affect FEM solves; manual user actions may be required (no autonomous changes).
- WSL memory tuning may be necessary to prevent OOM; guidance is provided but changes must be performed by the user.
These are presented as factual prerequisites and constraints; the skill does not guarantee outcomes beyond what is stated.
# Analyzing EM Performance of RF PCB Components ## When to Use - Extracting S-parameters from any RF PCB component (catalog or custom pcbComponent) - Comparing MoM vs FEM solvers or selecting the right solver for a structure - Using interpolating sweeps or frequencySweep objects for faster multi-frequency analysis - Controlling mesh density for accuracy vs speed tradeoffs - Visualizing E/H fields, surface currents, or charge distributions - Using behavioral (analytic) S-parameter models for fast estimates or optimization ## When NOT to Use - Building or assembling custom PCB structures — use `matlab-assemble-pcb-layout` - Designing standard transmission lines or catalog objects — use `matlab-design-pcb-txline` - Defining dielectric or metal materials — use `matlab-manage-pcb-material` - Cascading or connecting multiple components into circuits — use `matlab-integrate-pcb-circuit` - Importing PCB layouts from Gerber, ODB++, or Allegro — use `matlab-read-pcb-layout` ## Typical Workflow 1. **Before:** `matlab-manage-pcb-material` — substrate/conductor setup; then a design skill or `matlab-assemble-pcb-layout` — create the component 2. **This skill:** Extract S-parameters, visualize fi
- When to Use
- When NOT to Use
- Typical Workflow
- Quick Reference
- S-Parameter Extraction
- Basic Usage
- Specifying Port Impedance
- Plotting Specific S-Parameters
- Extracting Numeric Data
- Solver Selection
- Switching to FEM
- FEM Boundary Condition Configuration
- FEM Prerequisites
- WSL Memory Tuning
What does the matlab-analyze-em skill do?
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pc
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-analyze-em --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
