matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-generate-5g-waveform
matlab-generate-5g-waveform
VerifiedGenerate 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.9 KB |
| manifest.yaml | config | 440 B |
| references/api-reference.md | markdown | 3.4 KB |
| references/critical-rules.md | markdown | 8.0 KB |
| references/documentation-links.md | markdown | 2.4 KB |
| references/multi-bwp-guidance.md | markdown | 17.7 KB |
| references/narrow-band-manual-config.md | markdown | 4.5 KB |
| references/patterns.md | markdown | 1.8 KB |
| references/test-models-and-frc.md | markdown | 5.0 KB |
references/patterns.md
View on GitHub# Worked Waveform Patterns
Copy-ready examples for common single-carrier waveforms. For narrow-band
(11-RB) layouts see
[narrow-band-manual-config.md](narrow-band-manual-config.md); for multi-BWP see
[multi-bwp-guidance.md](multi-bwp-guidance.md); for test models and FRCs see
[test-models-and-frc.md](test-models-and-frc.md).
## Basic DL Waveform
```matlab
% 20 MHz, 30 kHz SCS downlink waveform with 64QAM PDSCH
cfg = nrDLCarrierConfig('FR1', 20, 30);
cfg.PDSCH{1}.Modulation = '64QAM'; % non-default (the default is QPSK)
[waveform, info] = nrWaveformGenerator(cfg);
% Plot resource grid. SSBurst (enabled by default) lives in a SEPARATE
% grid, so plot both the BWP data grid and the SS burst.
figure; tiledlayout(1,2);
nexttile; imagesc(abs(info.ResourceGrids(1).ResourceGridBWP(:,:,1)));
axis xy; xlabel('OFDM Symbols'); ylabel('Subcarriers'); title('DL Resource Grid (BWP)'); colorbar;
nexttile; imagesc(abs(info.ResourceGridSSBurst.ResourceGrid(:,:,1)));
axis xy; xlabel('OFDM Symbols'); ylabel('Subcarriers'); title('SS Burst Grid'); colorbar;
```
## Basic UL Waveform
```matlab
% 20 MHz, 15 kHz SCS uplink waveform with QPSK PUSCH
cfg = nrULCarrierConfig('FR1', 20, 15);
cfg.PUSCH{1}.Modulation = 'QPSK'; % explicit per request (also the default)
[waveform, info] = nrWaveformGenerator(cfg);
```
## Plot the Power Spectrum
For the power spectrum (rather than the resource grid), pass the waveform and
its sample rate to `pspectrum` — `sr` puts the frequency axis in real Hz:
```matlab
sr = info.ResourceGrids(1).Info.SampleRate;
figure;
pspectrum(waveform(:,1), sr); % first antenna; sr -> Hz frequency axis
title('5G NR Waveform Power Spectrum');
```
`spectrumAnalyzer` and `pwelch` also work; all need the sample rate.
Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |