matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-simulate-wireless-network
matlab-simulate-wireless-network
VerifiedSet up and run wireless network simulations using the Wireless Network Toolbox. Use this skill when creating system-level simulations with wirelessNetworkSimulator, adding traffic sources (networkTrafficOnOff, networkTrafficFTP, networkTrafficVoIP, networkTrafficVideoConference), configuring node mobility, logging events or IQ samples, visualizing traffic, scheduling actions during simulation, running parametric sweeps, writing PCAP files with pcapWriter or technology-specific PCAP writers, registering event callbacks on wireless nodes, accessing event data fields, or combining multiple capture/visualization tools in a simulation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.7 KB |
| manifest.yaml | config | 456 B |
| references/bluetooth-capture.md | markdown | 4.8 KB |
| references/custom-node.md | markdown | 10.9 KB |
| references/event-tracing-iq-logging.md | markdown | 3.1 KB |
| references/mobility-models.md | markdown | 2.4 KB |
| references/parametric-sweep-pattern.md | markdown | 2.1 KB |
| references/traffic-models.md | markdown | 2.9 KB |
references/parametric-sweep-pattern.md
View on GitHub# Parametric Sweep Pattern
## Core Rule
The `wirelessNetworkSimulator` is a singleton. You MUST call `.init` at the top of every loop iteration to reset state. Without this, nodes, connections, and traffic from prior iterations persist.
## Basic Sweep
```matlab
params = [10, 20, 30];
results = zeros(1, numel(params));
for idx = 1:numel(params)
sim = wirelessNetworkSimulator.init; % Reset simulator each iteration
% Create nodes (technology-specific)
% Configure connections (technology-specific)
% Add traffic
% addNodes(sim, nodes)
run(sim, 0.5);
% Extract results (technology-specific KPI or statistics)
results(idx) = extractMetric(nodes);
end
```
## Multi-Dimensional Sweep
For sweeps over 2+ parameters, use nested loops with `.init` in the innermost:
```matlab
paramA = [0.01, 0.02];
paramB = [0, 5, 10];
results = zeros(numel(paramA), numel(paramB));
for i = 1:numel(paramA)
for j = 1:numel(paramB)
sim = wirelessNetworkSimulator.init;
% Create and configure nodes using paramA(i) and paramB(j)
% Add traffic
% addNodes(sim, nodes)
run(sim, 0.3);
results(i,j) = extractMetric(nodes);
end
end
```
## Parallel Sweeps with parfor
For independent iterations, use `parfor` to parallelize:
```matlab
params = [0.0075, 0.01, 0.015, 0.02, 0.03, 0.04];
results = zeros(1, numel(params));
parfor idx = 1:numel(params)
sim = wirelessNetworkSimulator.init;
% Full setup inside parfor body — each worker independent
% Create nodes, configure, add traffic, addNodes
run(sim, 0.5);
results(idx) = extractMetric(nodes);
end
```
Requirements for `parfor`:
- Each iteration must be fully independent
- Parallel Computing Toolbox required
- Simulator reinit is mandatory (each worker gets its own singleton)
- Visualization tools (`wirelessTrafficViewer`) cannot be used inside `parfor`
## Key Rules
- `.init` must be **first** inside the loop (before node creation)
- Each iteration must recreate all nodes/connections (singleton resets everything)
- `parfor` cannot use visualization tools (`wirelessTrafficViewer`)
<!-- Copyright 2026 The MathWorks, Inc. -->
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |