
matlab-generate-5g-waveform
Generate 3GPP-compliant 5G NR downlink and uplink baseband waveforms. Use to create NR signals, test model (TM) waveforms, fixed reference channels (FRC), test and measurement (T&M) signals, or test vectors for conformance testing. Covers configuring data, control, and broadcast channels and signals: PDSCH, PUSCH, PDCCH, PUCCH, SRS, SSBurst, CSI-RS, DM-RS, PT-RS, CORESET, and BWP parameters including bandwidth, subcarrier spacing (SCS), modulation (QPSK, QAM), numerology, FR1, FR2, TDD, FDD, and multi-bandwidth-part setups. Use for signal generation, RF instrument playback, or IQ baseband synthesis. Requires 5G Toolbox.
- Installs
- 92
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-generate-5g-waveform- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads matlab-generate-5g-waveform automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Generate 5G NR Waveforms
Generate standard-compliant 5G NR downlink and uplink waveforms for test and
measurement, simulation, and verification using nrWaveformGenerator.
When to Use
- Generate a 5G, NR, or New Radio waveform (DL: PDSCH, PDCCH, SSBurst, CSI-RS; UL: PUSCH, PUCCH, SRS)
- Generate NR test model (TM) or fixed reference channel (FRC) waveforms
- Configure bandwidth, SCS, modulation, power, or multi-bandwidth-part layouts
When Not to Use
- Channel modeling or propagation — use
nrCDLChannel,nrTDLChannel - Receiver processing or decoding — use
nrPDSCHDecode,nrDLSCHDecoder - Link-level simulation end-to-end
API Choice
| Need | API |
|---|---|
| Custom DL waveform | nrDLCarrierConfig + nrWaveformGenerator |
| Custom UL waveform | nrULCarrierConfig + nrWaveformGenerator |
| Standard test model (TM) or FRC | hNRReferenceWaveformGenerator |
Do not use primitive-level functions (nrCarrierConfig + nrPDSCH +
nrOFDMModulate) for waveform generation, and do not mix primitive config
objects (nrPDSCHConfig, nrPUSCHConfig, nrCarrierConfig) with
nrWaveformGenerator — use the nrWavegen* objects. nrWaveformGenerator
handles channel multiplexing, power scaling, and OFDM modulation correctly.
Full function catalog, property names, and the incompatible-object table:
references/api-reference.md.
Core Workflow (custom DL/UL)
- Create the carrier config with the simplified constructor (R2026a+), which auto-sizes SCSCarriers, BandwidthParts, SSBurst/CORESET (DL), and a default PDSCH/PUSCH to the bandwidth:
cfg = nrDLCarrierConfig('FR1', 20, 30); % DL: FR1, 20 MHz, 30 kHz SCS
cfg = nrULCarrierConfig('FR1', 20, 15); % UL: FR1, 20 MHz, 15 kHz SCS
For DL, if the requested SCS differs from the default SSB numerology the
constructor adds a dedicated SSB SCS carrier (e.g. nrDLCarrierConfig('FR1', 5, 30)
adds a hidden 15 kHz carrier). Pre-R2026a, or to control the SCS-carrier count
exactly, build manually with nrDLCarrierConfig (no args).
-
Customize only what the task requires (see the rule below). Set non-defaults such as
cfg.PDSCH{1}.Modulation = '64QAM';. Never overwrite a constructor-placed value with a different one (e.g. forcingNStartBWP = 0when the constructor centered it) — that breaks the validated layout. -
Generate —
validateConfigchecks structural rules but does not catch channel conflicts (overlapping PDSCH/CSI-RS, CSI-RS/SSBurst); always run the generator, which returns the waveform and the resource-grid info:
[waveform, info] = nrWaveformGenerator(cfg);
What the simplified constructor builds is generation-ready as-is — an
unedited nrDLCarrierConfig(fr, bw, scs) or nrULCarrierConfig(fr, bw, scs)
generates for every FR1/FR2 bandwidth/SCS combination, so do not re-check what
it set. This does not apply to the no-argument nrDLCarrierConfig /
nrULCarrierConfig, whose defaults (15 kHz, Case A SSB, 52-RB PRBSet) must be
resized by hand. One silent caveat: at 3 MHz / 15 kHz the SSB is wider than
the 15-RB carrier, so the PBCH is punctured — this is expected; keep the SSB
(details in Critical Rules). Check the Critical Rules for
whatever you change or build by hand: a no-argument (manual) carrier, an
edited NSizeGrid/BWP/CORESET/PRBSet, a BlockPattern override, an added SCS
carrier or BWP (Point A centering), CSI-RS or PDCCH across BWPs, or 2 codewords
(layers/DM-RS). Those edits cause the most generation failures.
Set Only What the Task Requires
Set every property the task requires — including parameters forced by a
requested feature, even when the prompt never names them — and nothing else. For
example, 2 codewords → NumLayers 5–8 → a DM-RS that supports more than 4 ports
(see Critical Rules); a requested CSI-RS →
CSIRS{1}.Enable = true (off by default). These are required, not over-config.
SSBurst is already enabled by default, so a requested SS burst needs no
Enable line.
Recipes and References
Open the reference that matches the task; each has copy-ready, verified code:
- Common single-carrier waveforms (Basic DL with dual-grid plot, Basic UL, power spectrum): references/patterns.md
- Narrow-band 11-RB carriers, manual build only (5 MHz/30 kHz, 10 MHz/60 kHz).
The simplified constructor already handles these — skip this reference when you
use it. Open it only for a no-argument build (pre-R2026a, or to avoid the
auto-added SSB carrier), where the defaults fail and need
NSizeGrid = 11, a disabled/rehomed SSB, a shrunk CORESET, AL1, and an explicitPRBSet: references/narrow-band-manual-config.md - Multi-BWP / multi-numerology layouts: references/multi-bwp-guidance.md
- Test models (TM) and fixed reference channels (FRC) — use the example
helper
hNRReferenceWaveformGenerator(RC, BW, SCS)(e.g.'DL-FRC-FR1-64QAM','NR-FR1-TM1.1'), thengenerateWaveform+displayResourceGrid. It is not on the path by default: first make it available with a portable setup (setupExample('5g/NRTestModelWaveformGenerationExample', ...)+copyfile+cd, oropenExample) — never a hardcoded path, never a made-up namespaced name. Valid names, portable-setup block, andmakeConfigWritableedits: references/test-models-and-frc.md - Full API catalog + output structure (fields of
info, correct property names): references/api-reference.md - Online documentation links: references/documentation-links.md
Conventions
- After generating a waveform, unless the user asks for something specific:
- Tell the user the waveform variable name and that it is in the workspace
- Plot the resource grid from
info.ResourceGrids(k).ResourceGridBWP(BWP-sized, one per BWP); useResourceGridInCarrieronly for a full-carrier view. The SS burst is a separate grid — whenSSBurst.Enableis true and the SS burst is asked for, also plotinfo.ResourceGridSSBurst.ResourceGrid(it is not part ofResourceGridBWP) - Save the generation code as a
.mscript and open it in the MATLAB editor withedit('scriptName.m')
- Start with the simplified constructor
nrDLCarrierConfig('FR1', bw, scs)when possible - Correct property names:
DMRSPower(not PowerDMRS),PTRSPower(not PowerPTRS),NSizeGrid(not NRB),ChannelBandwidth(not Bandwidth) SCSCarriers,BandwidthParts,CORESET,PDSCH,PUSCHare cell arrays — use{};SSBurstis a direct object — use.not{}- Use
tiledlayout/nexttilefor multi-panel figures; always label axes with units and include figure titles - Comment non-obvious, interdependent choices (why a given
NSizeGrid, why SSBurst is disabled, why a specificAggregationLevel) so the code explains itself
Copyright 2026 The MathWorks, Inc.
FAQ
What does the matlab-generate-5g-waveform skill do?
Generate 3GPP-compliant 5G NR downlink and uplink baseband waveforms. Use to create NR signals, test model (TM) waveforms, fixed reference channels (FRC), test and measurement (T&M) signals, or test vectors for conformance testing. Covers configuring data, control, and broadcast channels and signals: PDSCH, PUSCH, PDCCH, PUCCH, SRS, SSBurst, CSI-RS, DM-RS, PT-RS, CORESET, and BWP parameters including bandwidth, subcarrier spacing (SCS), modulation (QPSK, QAM), numerology, FR1, FR2, TDD, FDD, and multi-bandwidth-part setups. Use for signal generation, RF instrument playback, or IQ baseband synthesis. Requires 5G Toolbox.
How do I install matlab-generate-5g-waveform?
Run npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-generate-5g-waveform in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/matlab-generate-5g-waveform/ (personal) or .claude/skills/matlab-generate-5g-waveform/ (project).
Which AI agents can use matlab-generate-5g-waveform?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is matlab-generate-5g-waveform safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains matlab-generate-5g-waveform?
It is published by matlab in matlab/matlab-agentic-toolkit. It has 92 recorded installs.
More from matlab/matlab-agentic-toolkit
matlab-review-code
matlab/matlab-agentic-toolkit
Review MATLAB code for quality, performance, maintainability, and adherence to MathWorks coding standards. Uses checkmatlabcode and matlabcodingguidelines. Use when reviewing code, checking style, finding code smells, assessing quality, or preparing code for handoff or publication.
matlab-analyze-data
matlab/matlab-agentic-toolkit
Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, row filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
matlab-design-digital-filter
matlab/matlab-agentic-toolkit
Design and validate digital filters in MATLAB. Use when cleaning up noisy signals, removing interference, filtering signals, designing FIR/IIR filters (lowpass/highpass/bandpass/bandstop/notch), or comparing filters in Filter Analyzer.
matlab-modernize-code
matlab/matlab-agentic-toolkit
Modernize removed or discouraged MATLAB functions and patterns. Use when the checkmatlabcode MCP tool reports that a function "is not recommended", "will be removed in a future release", or "has been removed" — at any severity (info, warning, or error) — when migrating legacy code, or when replacing removed or discouraged APIs with current equivalents. Also applies to discouraged patterns Code Analyzer does not flag (containers.Map, bsxfun, str2num, eval, clear all) and to removed or discouraged functions such as trainNetwork, csvread, xlsread, datenum, guide, svmtrain, ltln2val, webmap.
matlab-create-live-script
matlab/matlab-agentic-toolkit
Create, edit, and run plain-text MATLAB live scripts (.m files) with rich text formatting, LaTeX equations, section breaks, and inline figures. Use when generating tutorials, analysis notebooks, reports, documentation, or educational content, when modifying existing live scripts, or when converting existing binary .mlx files to .m for version control. Requires R2025a+.
matlab-agentic-toolkit-setup
matlab/matlab-agentic-toolkit
Install and configure the MATLAB Agentic Toolkit — detect MATLAB, install the MCP server, register with your AI coding agent, and verify the environment. Supports Claude Code, Codex, GitHub Copilot, Amp, and Gemini CLI.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work