matlab-detect-capture-usrp
Smart triggered RF capture on NI USRP radios with Wireless Testbench — record only when a signal of interest appears, not continuously (triggered spectrum sensing).
Install / Use
npx skills add matlab/matlab-agentic-toolkit --skill matlab-detect-capture-usrpInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of matlab-detect-capture-usrp
matlab-detect-capture-usrp scores 89/100 on our quality scale, 1455th of 4,646 Development & Engineering skills we index (top 32%).
Its SKILL.md is 14 KB long, well organised into 18 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 18 days ago, so matlab-detect-capture-usrp is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
matlab-detect-capture-usrp compared with similar skills
All 4 of these similar skills score higher than matlab-detect-capture-usrp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-detect-capture-usrp (this skill)by matlab | 89 | 1.1k | 18d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.9k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 3d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install matlab-detect-capture-usrp?
- Run
npx skills add matlab/matlab-agentic-toolkit --skill matlab-detect-capture-usrp. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-detect-capture-usrp work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is matlab-detect-capture-usrp safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-detect-capture-usrp still maintained?
- The repository was last updated 18 days ago, so matlab-detect-capture-usrp is actively maintained.
Skill content
View source on GitHubname: matlab-detect-capture-usrp description: Smart triggered RF capture on NI USRP radios with Wireless Testbench — record only when a signal of interest appears, not continuously (triggered spectrum sensing). Use energy detection to capture when signal power rises above the noise floor, or preamble detection to cross-correlate against a known sequence (WLAN L-LTF, 5G NR PSS/SSS, LTE PSS, Zadoff-Chu, custom protocols) and capture only when that protocol's preamble is detected. Use when implementing triggered (wake-on-signal) capture or spectrum sensing, capturing protocol-based signals via cross-correlation, calibrating detection thresholds (plotDetectionSignals / plotThreshold), scanning frequency bands for activity, or building transmit-then-detect workflows. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.0"
Detect and Capture RF Signals on NI USRP Radios
Reference Loading
- Code patterns (required at Step 4): for the seven copy-ready capture patterns (A–G) and the loopback table,
Read references/patterns.mdbefore generating any capture code. - For API signatures, property ranges, and threshold constraints:
Read references/api.md - For conceptual architecture and detector behavior:
Read references/overview.md - For the threshold calibration sub-workflow (
plotDetectionSignals/plotThresholdstep-by-step):Read references/threshold-calibration.md - Load the api / overview / calibration references only when generating code that requires specific parameter values, constraints, or tuning.
Sub-Workflows
This skill exposes one sub-workflow that is loaded on demand from references/:
| Sub-workflow | What it provides |
|--------------|------------------|
| Threshold Calibration (references/threshold-calibration.md) | Step-by-step plot -> diagnose -> tune procedure for both energyDetector and preambleDetector, plus combined symptom -> cause -> fix table |
Trigger: when to route into Threshold Calibration
Route into references/threshold-calibration.md whenever any of these conditions hold:
- No detection — generated Pattern returned
status == 0(capture timed out, no data captured) and the user expected a signal to fire it. This is the primary trigger. - Wrong detection — Pattern returned
status >= 1but the captured data is wrong: noise instead of signal, baseline instead of preamble, saturated waveform (max(abs(data))near1.414), or sanity ratio fails (r < 50for energyDetector,r < 100for preambleDetector). - Unstable detection — Pattern fires inconsistently across consecutive runs (sometimes
status=0, sometimesstatus=1); thresholds are sitting on a jittery boundary. - User explicitly asks to "calibrate", "tune thresholds", "tune detection", "fix detection", "why didn't it detect", "diagnose", or names
plotDetectionSignals/plotThreshold.
Do not route into the sub-workflow for first-time code generation — generate the Pattern from this SKILL.md, run it, and only route into calibration on a failure outcome. The sub-workflow assumes a detector object is already configured and a TX or external signal is present.
If the failure mode is RF-path (no peaks at all on the figure, wrong frequency, broken cable, wrong antenna name), the sub-workflow exits early back to this skill — calibration cannot fix RF problems.
Generate working MATLAB code to detect and capture RF signals using energy detection or preamble detection triggers on NI USRP radios with Wireless Testbench.
Prerequisites
Before this skill applies, the user must have:
- MATLAB R2022a+ (preambleDetector) or R2023b+ (energyDetector)
- Wireless Testbench toolbox installed
- Wireless Testbench Support Package for NI USRP Radios installed
- Radio previously configured using the Radio Setup wizard
- Physical NI USRP radio connected and validated
When to Use
Trigger this skill when the user wants smart/triggered capture — record only when something interesting appears on the air, not continuously:
- Capture only when signal energy rises above the noise floor (
energyDetector, Patterns A/B/E/F) — wake-on-signal recording, opportunistic capture, transmit-then-detect verification - Capture only when a known protocol preamble is cross-correlated and matched (
preambleDetector, Patterns C/D/G) — WLAN L-LTF, 5G NR PSS/SSS, LTE PSS, Zadoff-Chu, custom sync sequences - Calibrate detection thresholds (
plotDetectionSignalsfor energyDetector,plotThresholdfor preambleDetector) - Scan multiple frequencies / channels for activity (e.g., WLAN channel scan across 2.4 GHz band)
- Transmit a test waveform from the same radio and capture it back upon detection (loopback verification)
- Capture multiple consecutive triggered signals with sample-clock timestamps
When NOT to Use
Route to another skill if the user's goal is:
- Untriggered capture (immediate IQ capture without detection) ->
matlab-transmit-capture-usrp - Continuous streaming (System objects, real-time processing loops) -> use the
matlab-read-documentationskill for "Live Data I/O" (Wireless Testbench) - Radio setup or troubleshooting ->
matlab-set-up-usrp-radio - Clock/time synchronization -> use the
matlab-read-documentationskill for "Radio Management" (Wireless Testbench) - FPGA targeting -> use the
matlab-read-documentationskill for "Target NI USRP Radios" (Wireless Testbench)
Decision Tree
User request
|
|-- Mentions "untriggered capture", "immediate capture", "basebandReceiver"
| -> REDIRECT to matlab-transmit-capture-usrp
|
|-- Mentions "System object", "streaming loop", "real-time processing"
| -> REDIRECT: use matlab-read-documentation for "Live Data I/O" (Wireless Testbench streaming)
|
|-- Wants triggered capture (detection-based)
| |
| |-- Knows signal structure (preamble sequence available)
| | |-- Adaptive threshold -> Pattern C
| | |-- Fixed threshold -> Pattern D
| | |-- Wants to calibrate threshold -> Pattern D + plotThreshold
| | |-- Frequency scanning loop -> Pattern G
| |
| |-- Explicit energy/power cue (energy rise, power increase), no preamble
| | |-- Adaptive threshold (energy delta + minimum) -> Pattern A
| | |-- Fixed threshold -> Pattern B
| | |-- Wants to calibrate threshold -> Pattern A/B + plotDetectionSignals
| | |-- Multiple captures with timestamps -> Pattern E
| | |-- Transmit-then-detect workflow -> Pattern F
| |
| |-- Ambiguous: no energy/power cue, no preamble, no parameters given
| -> ASK FIRST (do not assume energy): "Do you have a known preamble
| sequence to correlate against, or do you want to trigger on any
| signal energy increase? Also, what threshold values or detection
| parameters would you like to use?"
Code Generation Steps
Key Functions
| Function | Purpose | Toolbox | Available From |
|----------|---------|---------|----------------|
| energyDetector | Arm radio; trigger capture when energy rises above the noise floor | Wireless Testbench | R2023b |
| preambleDetector | Arm radio; trigger capture on correlation with a known preamble | Wireless Testbench | R2022a |
| capture | Blocking triggered IQ capture (returns on detection or timeout) | Wireless Testbench | with detector object |
| capture(..., "NumCaptures", N) | Capture N consecutive triggered signals (Pattern E) | Wireless Testbench | R2024a |
| plotDetectionSignals | Calibrate energy threshold — energyDetector only | Wireless Testbench | R2023b |
| plotThreshold | Calibrate preamble threshold — preambleDetector only | Wireless Testbench | R2022a |
| transmit / stopTransmission | Send / stop a test waveform on the detector object (Pattern F) | Wireless Testbench | with detector object |
| zadoffChuSeq | Generate a Zadoff-Chu preamble sequence (Patterns C/D) | Communications Toolbox | R2012b |
| wlanLLTF / wlanNonHTConfig | Build the WLAN L-LTF preamble (Pattern G) | WLAN Toolbox | R2015b |
| chirp | Generate a test chirp waveform (Pattern F) | Signal Processing Toolbox | before R2006a |
Step 1: Determine Detector Type
Select on an explicit cue, not on the mere absence of a preamble.
| Signal | User says | Detector |
|--------|-----------|----------|
| Energy-based | explicit energy/power cue: "energy", "power increase/rise", "amplitude above the noise floor" | energyDetector |
| Preamble-based | "preamble", "Zadoff-Chu", "L-LTF", "PSS/SSS", "correlation", a known sequence | preambleDetector |
| Ambiguous | only "detect a signal" / "capture when it appears" — no energy/power cue, no preamble, no threshold parameters | Ask first (Guardrails -> Ask First); do not default to energy |
Step 2: Gather Required Inputs
| Parameter | Required | Ask if missing | |-----------|----------|----------------| | Radio name | Yes | Always | | Center frequency | Yes | Yes | | Sample rate | Yes | Yes | | Threshold method | Yes | Yes (adaptive/fixed) | | Threshold values | Yes | Yes | | Capture duration | Yes | Yes | | Timeout | Yes | Default seconds(1) if not specified | | Preamble sequence | Only for preambleDetector | Yes |
Step 3: Validate Constraints
Check parameter values against valid ranges before generating code. See references/api.md for complete constraint tables (WindowLength, FixedThreshold, Preamble length, TriggerOffset, AdaptiveThresholdGain, AdaptiveThresholdOffset).
If a value violates these constraints, inform the user and suggest the valid range. Do NOT generate code with invalid values.
Step 4: Generate Code
The seven copy-ready patterns (A–G) live in references/patterns.md. Read references/patterns.md now, then use the pattern the Decision Tree selected. Each pattern ships with concrete default values — replace the values marked % <- set with the user's radio and signal parameters, and validate them against the references/api.md ranges (Step 3) before running. For loopback bring-up (transmit-then-detect), follow the Local Hardware Testing table in that file.
| Pattern | Detector | Threshold | Use case |
|---------|----------|-----------|----------|
| A | energyDetector | adaptive | Wake-on-signal capture on an energy rise |
| B | energyDetector | fixed | Capture above a fixed power level |
| C | preambleDetector | adaptive | Capture on correlation with a known preamble |
| D | preambleDetector | fixed | Preamble capture / plotThreshold calibration |
| E | energyDetector | adaptive | Multiple consecutive captures with timestamps |
| F | energyDetector | adaptive | Transmit-then-detect (loopback) |
| G | preambleDetector | adaptive | Frequency-scanning loop (WLAN channel scan) |
If a generated pattern fires unreliably (timeout despite a real signal, false positives, or captures of noise/baseline), route into the threshold calibration sub-workflow — see the per-pattern calibration notes in references/patterns.md and the procedure in references/threshold-calibration.md.
Guardrails
Organized by when they apply: Always rules fire on every generation, Ask First rules pause for the user, Never rules trigger a refusal and redirect.
Always
- Use a
radioNamevariable from user input — never hardcode radio names. - Begin every pattern with
clear ed pd— releases any prior radio lease regardless of detector class. The same physical radio can be held by either anenergyDetectoror apreambleDetectorobject; clearing only one variable name does not release a lease held by the other, which causesvalidateLeaseOwnererrors when patterns are pasted sequentially into the same MATLAB session. - Validate threshold ranges before generating code — see
references/api.mdfor exact valid ranges per parameter (key: energyDetectorFixedThreshold
Truncated for display — read the full file on GitHub.
Related Skills
ai-job-search
44.9kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
