matlab-model-rf

Design, analyze, and simulate RF systems in MATLAB using RF Toolbox and RF Blockset.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-model-rf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-model-rf
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/rf-and-mixed-signal/matlab-model-rf
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-model-rf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

RF engineers working in MATLAB often struggle with subtle API conventions in RF Toolbox and RF Blockset—incorrect argument ordering, silent errors from misused constructors, and confusion between frequency-domain budget analysis and time-domain simulation. This Skill provides curated, correct-by-construction guidance for the entire RF workflow, from loading Touchstone S-parameter files through full Circuit Envelope simulation, preventing common pitfalls that produce wrong results or block execution.

Core Features & Use Cases

  • S-Parameter I/O and Network Conversions: Load Touchstone files (.s1p–.snp), convert between S/Z/Y/ABCD/T/H/G parameters, compute mixed-mode differential parameters, and cascade or de-embed networks with proper frequency alignment.
  • System Budget Analysis: Build RF signal chains with rfbudget elements (amplifier, modulator, rffilter, nport) and compute cascaded gain, noise figure, IP3, and SNR.
  • Circuit Composition and Matching: Compose SPICE-like netlists with the circuit object, design impedance matching networks, and analyze amplifier stability (K-factor, mu) and power gain.
  • Time-Domain Simulation: Fit rational models, compute TDR/step responses, process complex baseband signals through rf.Amplifier/rf.Mixer/rf.Filter System Objects, and run Circuit Envelope simulation via rfsystem.
  • Use Case: An engineer receives a measured .s2p file for an LNA and needs to verify stability, design input/output matching networks, cascade it with a filter and mixer in an rfbudget chain, and simulate the full receiver in the time domain—all with correct MATLAB API usage on the first attempt.

Quick Start

Ask your AI agent to load a Touchstone file, plot its S-parameters on a Smith chart, and build an rfbudget cascade analysis for your RF signal chain.

Frequently Asked Questions about matlab-model-rf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load and plot S-parameters from a Touchstone file in MATLAB?

Use sparameters('file.s2p') to load the Touchstone file, then rfplot(s) for rectangular plots or smithplot(s) for Smith charts. Note that you cannot pass reference impedance at load time—load first, then re-normalize with newref(s, Z0).

How do I cascade or de-embed S-parameter networks in MATLAB?

Use cascadesparams to chain networks and deembedsparams to remove fixture effects. Both require identical frequency vectors, so always interpolate to a common grid with rfinterp1 first. deembedsparams always takes three arguments: measured data plus both fixtures.

What is the difference between rfbudget elements and rf.* System Objects?

rfbudget elements (amplifier, modulator, rffilter) define frequency-domain specifications for cascade budget analysis of gain, NF, and IP3. The rf.* System Objects (rf.Amplifier, rf.Mixer, rf.Filter) process complex baseband signals frame-by-frame in the time domain and require R2024b or later.

Why does rfwrite block execution when writing Touchstone files?

rfwrite opens an interactive overwrite dialog when the target file already exists, halting unattended scripts. Always pass 'ForceOverwrite', true to rfwrite so batch and automated workflows run without user intervention.

When should I not use RF Toolbox for my MATLAB project?

Use Antenna Toolbox for antenna design and radiation patterns, Communications Toolbox or Phased Array System Toolbox for propagation modeling and radar, and SerDes Toolbox for high-speed serial link equalization with IBIS-AMI models. RF Toolbox covers S-parameters, budget analysis, and circuit simulation.

Why does my rfbudget analysis return empty NF and IP3 results?

The SignalBandwidth argument is required as the fourth positional argument to rfbudget. Without it, noise figure, IP3, and SNR outputs remain empty even though the object constructs successfully.