Matlab Model Rf
MathWorksOfficialCreated by MathWorks
- Skill
- Guidelines
- Science and research
- BSD-2-Clause
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to utilizing MATLAB's RF Toolbox and RF Blockset for end-to-end RF system development. It covers workflows ranging from measured S-parameter data validation and network conversions to complex circuit-level design, amplifier stability analysis, and time-domain Circuit Envelope simulation. The documentation emphasizes best practices for script-based workflows, proper element handling, and avoiding common pitfalls in RF parameter manipulation and system modeling.
What it does
- Validates and processes measured S-parameter data from Touchstone files.
- Performs network parameter conversions and mixed-mode analysis.
- Enables RF signal chain design and cascaded budget analysis.
- Supports circuit-level composition and impedance matching network design.
- Facilitates amplifier stability analysis and mixer intermodulation planning.
- Provides tools for rational fitting and time-domain system simulation.
When to use it
- When working with measured S-parameter data for validation or de-embedding.
- When designing RF signal chains and performing cascaded budget analysis.
- When composing arbitrary RF circuits using node-based netlists.
- When analyzing amplifier stability or mixer spur performance.
- When performing time-domain signal integrity or Circuit Envelope simulations.
Advantages
- Unified workflow for both passive and active RF device characterization.
- Strict adherence to MATLAB identifier and object handling rules prevents silent errors.
- Comprehensive support for modern visualization tools like tiledlayout and smithplot.
- Clear separation between script-based design workflows and interactive analysis.
- Detailed guidance on avoiding common errors in port ordering and parameter units.
Usage examples
- “How do I load an S-parameter file and plot it on a Smith chart?”
- The agent will guide you to use sparameters() to load the file, followed by smithplot() for visualization, ensuring you handle reference impedance correctly via newref() if needed.
- “Calculate the cascaded gain and noise figure for my RF chain.”
- The agent will help you define elements using rfbudget, ensuring you set the SignalBandwidth and use clone() for reused elements, then run the budget analysis.
- “How do I analyze the stability of an amplifier?”
- The agent will instruct you to use stabilityk and stabilitymu, and calculate power gain using powergain with the correct linear-to-dB conversion.
- “I need to export my S-parameters to a new file.”
- The agent will provide the rfwrite command, specifically reminding you to include 'ForceOverwrite', true to avoid interactive dialogs.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/matlab/matlab-model-rf/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip matlab-model-rf.zip -d .agents/skills
Documentation by MathWorks
RF Toolbox and RF Blockset
Design, analyze, and simulate RF systems in MATLAB -- from measured S-parameter data through full time-domain Circuit Envelope simulation. One unified workflow covering passive networks, active device characterization, system cascade budgets, and behavioral time-domain modeling.
When to Use
Measured data workflows
Loading Touchstone files (.s1p through .snp), validating quality (passivity, causality, IEEE P370)
Plotting on Smith charts and rectangular plots, interpolating, re-referencing impedance
Converting between S, Z, Y, ABCD, T, H, G parameters; computing mixed-mode differential
Cascading and de-embedding S-parameter networks; fixture removal
System design and analysis
Building RF signal chains from behavioral elements (amplifier, modulator, rffilter, nport, etc.)
Computing cascaded gain, noise figure, IP3, SNR, output power with rfbudget
Comparing Friis vs Harmonic Balance solver accuracy
Exporting to RF Blockset Simulink models, Communications Toolbox, or MATLAB scripts
Circuit-level design
Composing arbitrary RF circuits with node wiring (SPICE-like netlist)
Designing impedance matching networks (L, Pi, Tee topologies, Richards stubs)
Analyzing amplifier stability (K-factor, mu), power gain, and matching conditions
Mixer intermodulation analysis and spur-free IF frequency planning
Time-domain and signal integrity
Fitting S-parameters to rational models; computing TDR, impulse, step responses
Exporting broadband circuit models to SPICE or Verilog-A
Building SI channel models from nport blocks, lossy transmission lines, and parasitics
Processing complex baseband signals through rf.Amplifier, rf.Mixer, rf.Filter System Objects
Full Circuit Envelope time-domain simulation via rfsystem (no Simulink knowledge required)
When NOT to Use
Antenna design and radiation patterns -- use Antenna Toolbox
RF propagation modeling (path loss, fading, ray tracing) -- use Communications Toolbox or Phased Array System Toolbox
SerDes/high-speed serial link equalization (FFE, CTLE, DFE, IBIS-AMI) -- use SerDes Toolbox
Radar waveform design or phased arrays -- use Phased Array System Toolbox
Must-Follow Rules
These apply across ALL RF Toolbox workflows. Violating them produces silent errors or blocks execution.
Universal
rfwriteblocks on existing files -- Always pass'ForceOverwrite', true. Without it, MATLAB opens an interactive overwrite dialog that halts unattended execution.Elements cannot be reused -- The same element object cannot appear twice in an rfbudget or circuit. Use
clone(element)for independent copies.Element Name must be a valid MATLAB identifier -- No spaces, no special characters. Use
'IFAmp'not'IF Amp'.Use
tiledlayout/nexttile-- Notsubplot. For all multi-panel figures.rfparamreturns complex, not dB -- Always use20*log10(abs(rfparam(...)))for dB magnitude.
S-Parameters and Network Parameters
sparameters(filename, Z0)is invalid -- Cannot pass reference impedance at load time. Load first, thennewref(s, Z0).rfinterp1interpolates real/imag independently -- Not magnitude and angle. Can produce artifacts near sharp resonances.Frequency alignment required for cascade/de-embed --
cascadesparamsanddeembedsparamsrequire identical frequency vectors. Alwaysrfinterp1to a common grid first.deembedsparamsalways requires 3 arguments --(sMeasured, sFixture1, sFixture2). For one-sided, pass an ideal thru for the unused side.Mixed-mode port ordering is the #1 error source --
s2sddoption 1 (default) treats ports 1,2 as positive and 3,4 as negative. Verify which option matches your VNA port numbering.snp2smpargument order: ports before impedance --snp2smp(s, portList, Z0), notsnp2smp(s, Z0, portList).
rfbudget and Elements
SignalBandwidthis required -- The 4th positional arg torfbudget. Without it, NF/IP3/SNR remain empty.Passive NF equals loss -- For
rfelement, NF should equalabs(Gain). Preferattenuatorwhich handles this automatically.nportName is positional --nport('file.s2p', 'MyName'), not name-value syntax.rffilter:
ResponseTypeis shape,FilterTypeis algorithm --rffilter('FilterType', 'Bandpass')errors. Userffilter('ResponseType', 'Bandpass').show(b)opens a GUI -- Produces no command-window output. Use properties (b.TransducerGain,b.NF) for programmatic access.
Circuit Composition
setports/setterminalscan only be called once -- Plan topology before defining terminals.2-port RF elements use 4-node mapping --
add(ckt, [in out inRef outRef], elem)for amplifier, modulator, nport, all txline types. Primitive 2-terminal elements (resistor, capacitor, inductor) use 2-node mapping.Primitive constructors are positional --
resistor(100, 'R1'), notresistor('Resistance', 100).setterminalstakes a node vector --setterminals(ckt, [1 2]), notsetterminals(ckt, 1, 2).All txline constructors use name-value pairs only -- No positional arguments.
Amplifier Analysis
powergaingain type string must be last --powergain(s, 50, 50, 'Gt'), notpowergain(s, 'Gt', 50, 50).powergainreturns linear, not dB -- Convert with10*log10(g)(power gain uses 10x, not 20x).Gmagreturns NaN when conditionally stable -- UseGmsgat frequencies where K < 1.
Rational Fitting
rationalvsrationalfit-- Userationalfor new code (AAA). Userationalfitonly for delay extraction.Single-param fit returns plain vectors; multi-port returns cell arrays -- Always check with
iscell(result).freqresptakes Hz -- Not rad/s. Passs.Frequenciesdirectly.
System Objects (rf.*)
rf.Amplifier/rf.Mixer use 1-ohm power --
Vin = sqrt(Pin_W). This differs from rfsystem which uses 50-ohm.rf.Filter frequencies are ABSOLUTE RF --
PassFreq_bp=[2.395e9 2.405e9]means absolute GHz. Not baseband offsets.Properties locked during use -- Call
release(obj)before modifying Nontunable properties.
rfsystem
Requires rfbudget --
rfsystemtakes an rfbudget, not raw elements.close_systemneeds save flag -- Useclose_system(rfs, 0)to discard changes.IdealizedBaseband only supports amplifier/modulator/rffilter/nport -- Other elements require CircuitEnvelope.
Workflow Quick Reference
| Task | Entry Point | Details |
|---|---|---|
| Load/plot S-parameters | sparameters, rfplot, smithplot | reference/sparameters-io.md |
| Convert S/Z/Y/ABCD, mixed-mode | zparameters, s2sdd, snp2smp | reference/network-conversions.md |
| Cascade or de-embed networks | cascadesparams, deembedsparams | reference/cascade-deembed.md |
| Create rfbudget elements | amplifier, modulator, rffilter, etc. | reference/rfbudget-elements.md |
| Run cascade budget analysis | rfbudget, rfplot(b, 'Pout') | reference/rfbudget-analysis.md |
| Compose RF circuits | circuit, add, setports | reference/circuit-composition.md |
| Design matching networks | matchingnetwork, richards | reference/matching-networks.md |
| Analyze amplifier stability/gain | stabilityk, powergain, gammams | reference/amplifier-analysis.md |
| Mixer spurs and IF planning | mixerIMT, OpenIF | reference/mixer-analysis.md |
| Fit rational models, TDR | rational, stepresp, generateSPICE | reference/rational-fitting.md |
| Build SI channel models | nport + txlineWRLGC + circuit | reference/si-channel-modeling.md |
| Process complex baseband | rf.Amplifier, rf.Mixer, rf.Filter | reference/baseband-processing.md |
| Time-domain system simulation | rfsystem, Circuit Envelope | reference/system-simulation.md |
Conventions
Code Style
Use
tiledlayout/nexttilefor multi-panel figures (notsubplot)Always label axes with units (GHz, dB, ns, dBm) and include figure titles
Name elements descriptively for readable topology (
'LNA','DCBlock','PCBTrace')Use
clone()liberally for element reuse
Script-First Workflow
For design, analysis, or sweep tasks -- write code to .m files on disk, not inline snippets. For quick one-off checks, inline evaluate_matlab_code is fine.
Modern APIs
tiledlayout/nexttileinstead ofsubplotdatetimeinstead ofdatenumrationalinstead ofrationalfit(unless delay extraction needed)smithplotinstead ofsmithrfplotfor S-parameter visualization (handles dB conversion automatically)
References
Load the relevant reference file before writing code for a specific workflow. Each reference contains correct calling conventions, constructor arguments, property names, gotchas, and executable code patterns.
Copyright 2026 The MathWorks, Inc.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer1.4 KiB
- SKILL.md9.8 KiB
- manifest.yaml536 B
- reference/amplifier-analysis.md9.3 KiB
- reference/amplifier-models.md2.8 KiB
- reference/amplifier-nonlinear-models.md6.2 KiB
- reference/baseband-processing.md18.5 KiB
- reference/cascade-deembed.md9.0 KiB
- reference/circle-computations.md7.3 KiB
- reference/circuit-composition.md14.1 KiB
- reference/ifft-step-response.md16.8 KiB
- reference/lumped-to-distributed.md2.7 KiB
- reference/matching-networks.md10.8 KiB
- reference/mixer-analysis.md11.0 KiB
- reference/network-conversions.md9.6 KiB
- reference/rational-fitting.md19.8 KiB
- reference/rfbudget-analysis.md8.4 KiB
- reference/rfbudget-elements.md16.8 KiB
- reference/rffilter-synthesis.md2.8 KiB
- reference/si-channel-modeling.md17.8 KiB
- reference/sparameters-io.md12.0 KiB
- reference/system-simulation.md12.9 KiB
- reference/time-domain-analysis.md3.0 KiB
- reference/transmission-lines.md2.8 KiB
reference/system-simulation.md
RF System Time-Domain Simulation
Run high-accuracy time-domain simulation on an RF signal chain using the rfsystem System Object. Under the hood, rfsystem auto-generates and manages a Simulink/RF Blockset model -- the user works entirely in MATLAB with the standard System Object step/reset/release interface.
Requires: RF Toolbox + Simulink + RF Blockset. rfsystem introduced R2021a. Idealized Baseband simulation mode ('IdealizedBaseband') requires R2023a or later. Circuit Envelope mode available from R2021a.
Creating an rfsystem
% Build an rfbudget first
lna = amplifier('Gain', 15, 'NF', 2, 'OIP3', 35, 'Name', 'LNA');
mix = modulator('Gain', -6, 'NF', 10, 'OIP3', 20, ...
'LO', 2.1e9, 'ConverterType', 'Down', 'Name', 'Mixer');
ifAmp = amplifier('Gain', 20, 'NF', 4, 'OIP3', 30, 'Name', 'IFAmp');
bpf = rffilter('ResponseType', 'Bandpass', 'FilterType', 'Butterworth', ...
'FilterOrder', 3, 'PassbandFrequency', [2.395e9 2.405e9], 'Name', 'BPF');
b = rfbudget([lna mix ifAmp], 2.4e9, -30, 10e6);
% Create rfsystem (default: CircuitEnvelope)
rfs = rfsystem(b);
% With options
rfs = rfsystem(b, ...
ModelName='MyReceiver', ...
Library='CircuitEnvelope', ...
SampleTime=1e-8);Constructor: rfsystem(rfbudget, Name=Value)
Properties
| Property | Default | Description |
|---|---|---|
ModelName | 'untitled' | Name of auto-generated Simulink model |
SampleTime | 1/(bw*8) | Time step for simulation (seconds) |
InputFrequency | from budget | Row vector of input carrier frequencies (Hz) |
OutputFrequency | from budget | Row vector of output carrier frequencies (Hz) |
RFInputs | from budget | Number of RF inputs (read-only) |
RFOutputs | from budget | Number of RF outputs (read-only) |
Library | 'CircuitEnvelope' | 'CircuitEnvelope' or 'IdealizedBaseband' |
Rx | 1 | Number of input chains (MISO receiver) |
Tx | 1 | Number of output chains (SIMO transmitter) |
SLInputs | 0 | Number of extra Simulink input ports |
SLOutputs | 0 | Number of extra Simulink output ports |
Mismatch | false | Model impedance mismatch loss (IdealizedBaseband only) |
Library Modes
rfsystem supports two modes. RF Blockset itself supports a third (Equivalent Baseband) that is accessible only from the Simulink model generated by exportRFBlockset(b). Both IdealizedBaseband and Equivalent Baseband process complex baseband signals and model nonlinear compression; CircuitEnvelope additionally resolves multi-carrier and mismatch effects. The legacy rfckt analysis workflow (analyze) is equivalent baseband under the hood.
CircuitEnvelope (Default)
Full RF Blockset circuit envelope simulation. Supports all rfbudget element types and provides the highest accuracy -- accounts for nonlinear compression, intermodulation, impedance mismatch, and multi-carrier effects.
rfs = rfsystem(b, Library='CircuitEnvelope');Supported elements: amplifier, modulator, rffilter, nport, rfelement, attenuator, phaseshift, seriesRLC, shuntRLC, lcladder, mixerIMT.
IdealizedBaseband
Faster simulation using idealized complex baseband models. More restrictive on element types but significantly faster for large signal chains.
rfs = rfsystem(b, Library='IdealizedBaseband');Supported elements: amplifier, modulator, rffilter, nport only.
Gotcha: IdealizedBaseband rejects rfelement, attenuator, phaseshift, seriesRLC, shuntRLC, lcladder, mixerIMT, and rfantenna with "Expected elements in rfobj to be one of these types: amplifier, modulator, rffilter, nport." Replace unsupported elements or use CircuitEnvelope.
Mismatch Loss
rfs = rfsystem(b, Library='IdealizedBaseband', Mismatch=true);Gotcha: Mismatch=true only works with IdealizedBaseband. Using it with CircuitEnvelope errors.
Running Simulation (step)
The rfsystem object follows the standard System Object streaming pattern: call rfs(in) repeatedly with frame-sized input vectors.
rfs = rfsystem(b);
Ts = rfs.SampleTime;
% Input: complex baseband envelope at InputFrequency
% Power scaling: Vin = sqrt(2 * Z0 * Pin_W) for a 50-ohm system
Pin_dBm = -30;
Pin_W = 10^((Pin_dBm - 30) / 10);
Vin = sqrt(2 * 50 * Pin_W);
% Single frame
nSamples = 100;
inSig = Vin * ones(nSamples, 1); % CW tone
out = rfs(inSig);
% Measure output power
Pout_dBm = 10*log10(mean(abs(out).^2 / (2*50))) + 30;
fprintf('Output: %.2f dBm\n', Pout_dBm);Multi-Frame Streaming
Call step repeatedly -- the system accumulates state across frames:
nFrames = 10;
frameLen = 256;
allOut = zeros(frameLen * nFrames, 1);
for k = 1:nFrames
inFrame = Vin * randn(frameLen, 1) + 1j * Vin * randn(frameLen, 1);
outFrame = rfs(inFrame);
allOut((k-1)*frameLen + (1:frameLen)) = outFrame;
endModulated Signal Example
% QPSK signal through receiver chain
rng(42);
nSym = 1000;
symbols = (2*randi([0 1], nSym, 1) - 1) + 1j*(2*randi([0 1], nSym, 1) - 1);
inMod = Vin * symbols / sqrt(2);
outMod = rfs(inMod);
Pout = 10*log10(mean(abs(outMod).^2 / (2*50))) + 30;
fprintf('Modulated output: %.2f dBm\n', Pout);EVM Measurement
After running a modulated signal through rfsystem, compute EVM by removing the deterministic gain/phase shift before comparing against the reference:
% Generate reference signal at correct power level
Pin_dBm = b.AvailableInputPower;
Pin_W = 10^((Pin_dBm - 30) / 10);
Vin = sqrt(2 * 50 * Pin_W);
rng(42);
nSym = 1000;
symbols = (2*randi([0 1], nSym, 1) - 1) + 1j*(2*randi([0 1], nSym, 1) - 1);
txSig = Vin * symbols / sqrt(2); % QPSK at correct input power
outSig = rfs(txSig);
% Remove deterministic gain+phase via least-squares alignment
scaleFactor = outSig \ txSig;
outAligned = outSig * scaleFactor;
% EVM as percentage
evm_pct = 100 * sqrt(mean(abs(outAligned - txSig).^2) / mean(abs(txSig).^2));
fprintf('EVM: %.2f%%\n', evm_pct);Gotcha: Without phase alignment (outSig \ txSig), the gain and carrier phase offset of the chain inflate EVM. The backslash operator gives the least-squares complex scale factor in one step.
Zero-IF (Direct Conversion)
When the rfbudget output frequency is 0 Hz (fRF = fLO), the output splits into separate I and Q components. The RFOutputs property becomes 2.
% Direct-conversion receiver: fRF = fLO
lna = amplifier('Gain', 15, 'NF', 2, 'OIP3', 35, 'Name', 'LNA');
mix = modulator('Gain', -6, 'NF', 10, 'OIP3', 20, ...
'LO', 2.4e9, 'ConverterType', 'Down', 'Name', 'Mixer');
ifAmp = amplifier('Gain', 20, 'NF', 4, 'OIP3', 30, 'Name', 'IFAmp');
b = rfbudget([lna mix ifAmp], 2.4e9, -30, 10e6);
rfs = rfsystem(b);
fprintf('RFOutputs: %d\n', rfs.RFOutputs); % 2 (I and Q)
% Step returns separate I and Q
[outI, outQ] = rfs(inSig);
outComplex = outI + 1j * outQ; % Reconstruct complex basebandGotcha: When OutputFrequency is 0, RFOutputs becomes 2 and the step method returns two output arguments (I and Q). Using a single output out = rfs(in) gives only the I component.
MISO Receiver and SIMO Transmitter
MISO Receiver (Multiple Inputs, Single Output)
rfs = rfsystem(b, Rx=2);
fprintf('RFInputs: %d\n', rfs.RFInputs); % 2
% Two RF inputs combined into one output
out = rfs(in1, in2);SIMO Transmitter (Single Input, Multiple Outputs)
% Up-conversion transmitter chain
upMix = modulator('Gain', -6, 'NF', 10, 'OIP3', 20, ...
'LO', 2.1e9, 'ConverterType', 'Up', 'Name', 'UpMixer');
pa = amplifier('Gain', 25, 'NF', 5, 'OIP3', 40, 'Name', 'PA');
bTx = rfbudget([upMix pa], 0.3e9, -10, 10e6);
rfsTx = rfsystem(bTx, Tx=2);
fprintf('RFOutputs: %d\n', rfsTx.RFOutputs); % 2
[out1, out2] = rfsTx(inSig);Simulink I/O Ports (SLInputs / SLOutputs)
Add extra Simulink ports for control signals or monitoring:
rfs = rfsystem(b, SLInputs=1, SLOutputs=1);
% Step with RF input and Simulink control input
[outRF, outSL] = rfs(inRF, inSL);System Object Lifecycle
reset -- Clear Internal State
Restarts simulation clock to t=0 (clears operating point). Can call step again immediately without unlocking properties:
reset(rfs);
out = rfs(newInput); % Fresh simulation from t=0release -- Allow Property Changes
Unlocks properties for modification. After release, SampleTime, InputFrequency, etc. can be changed:
release(rfs);
rfs.SampleTime = 5e-9; % Change sample time
out = rfs(newInput); % Re-runs setup on next stepSummary: reset = restart clock, release = unlock properties.
Gotcha: Properties are locked while the system is in use (between first step and release). Attempting to set a property without calling release first errors.
Model Management
The auto-generated Simulink model can be inspected, modified, and saved:
rfs = rfsystem(b, ModelName='MyReceiver');
load_system(rfs); % Load model into memory (no GUI)
open_system(rfs); % Open model in Simulink editor
hide_system(rfs); % Hide model window
save_system(rfs); % Save model to disk
save_system(rfs, 'NewName');% Save with new name
close_system(rfs, 0); % Close without saving (0 = discard changes)
close_system(rfs, 1); % Close and saveGotcha: close_system(rfs) with no second argument errors if the model has unsaved changes: "Unable to close the model because it has been changed." Always use close_system(rfs, 0) to discard or close_system(rfs, 1) to save.
Inspecting the Model
load_system(rfs);
blocks = find_system(rfs.ModelName, 'Type', 'Block');
for k = 1:numel(blocks)
fprintf('%s\n', blocks{k});
endThe model contains RF Blockset blocks corresponding to each rfbudget element, plus Inport/Outport blocks for the RF and Simulink I/O.
rfBudgetAnalyzer
Open the RF Budget Analyzer app pre-loaded with the rfsystem's budget:
rfBudgetAnalyzer(rfs);SampleTime Selection
Default: 1 / (rfbudget.SignalBandwidth * 8) -- 8 samples per signal bandwidth period. Decrease for higher time resolution; increase for faster simulation.
rfs = rfsystem(b, SampleTime=1e-9); % 1 ns time stepElement Compatibility Summary
| Element | CircuitEnvelope | IdealizedBaseband |
|---|---|---|
| amplifier | Yes | Yes |
| modulator | Yes | Yes |
| rffilter | Yes | Yes |
| nport | Yes | Yes |
| rfelement | Yes | No |
| attenuator | Yes | No |
| phaseshift | Yes | No |
| seriesRLC | Yes | No |
| shuntRLC | Yes | No |
| lcladder | Yes | No |
| mixerIMT | Yes | No |
| rfantenna | No | No |
Gotchas
Requires rfbudget --
rfsystemtakes anrfbudgetobject, not raw elements or a circuit. Build the budget first.close_system needs save flag --
close_system(rfs)errors on unsaved models. Useclose_system(rfs, 0)to discard changes.IdealizedBaseband element restrictions -- Only amplifier, modulator, rffilter, nport. Other types error at construction.
Mismatch only with IdealizedBaseband --
Mismatch=trueerrors with CircuitEnvelope.Zero-IF splits I/Q -- When OutputFrequency=0,
RFOutputsbecomes 2 and step returns[I, Q]not a single complex output.rfantenna not supported -- Neither library mode supports rfantenna in the chain.
Properties locked during use -- Cannot change SampleTime, InputFrequency, etc. between step calls. Call
release(rfs)first.SampleTime default is bandwidth-derived --
1/(SignalBandwidth*8). For wideband signals, this can produce very small time steps and slow simulation.Simulink license required -- rfsystem requires a Simulink license even though the user never sees Simulink directly.
ModelName must be valid -- Must be a valid Simulink model name (valid MATLAB identifier, no spaces).
Element Name must be a valid variable name --
'IF Filter'errors with "not valid variable names." Use'IFFilter'or'IF_Filter'(no spaces, no special characters). This applies to all rfbudget elementNameproperties.Clone elements before reusing in a second rfbudget -- An element object can only belong to one
rfbudgetat a time. Reusing it errors with "Element is already in another rfbudget." Useclone(element)to create an independent copy for each budget.No
InputPowerproperty on rfbudget -- Useb.AvailableInputPowerfor the power into stage 1, andb.OutputPower(n-1)for the input power to the nth stage.b.InputPowerdoes not exist.
Conventions
Use
tiledlayout/nexttilefor multi-panel time-domain and spectral plotsAlways label axes with units (dBm, ns, MHz) and include figure titles
Call
close_system(rfs, 0)in cleanup to avoid orphaned Simulink modelsCompare rfsystem output against rfbudget Friis results to quantify nonlinear effects -- deltas of 0.5-2 dB are normal at backed-off power levels due to compression; larger deltas indicate operation near saturation
Copyright 2026 The MathWorks, Inc.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- MathWorks
- Publisher
- MathWorks (Official)
- Source
- matlab/matlab-agentic-toolkit · skills-catalog/rf-and-mixed-signal/matlab-model-rf · commit 2a7f215
- Licence
- BSD 2-Clause License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by MathWorks.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-model-rf.zip