matlab/matlab-agentic-toolkit / skills-catalog/signal-processing/matlab-prepare-signal-data
matlab-prepare-signal-data
VerifiedUse this skill when conditioning, loading, preparing, or labeling signal data for analysis or ML training. Covers: cleaning a single signal (fill gaps, remove drift, deoutlier, denoise, resample/align a time base) BEFORE analysis; building a `signalDatastore` pipeline; creating a `labeledSignalSet` for Signal Labeler; deriving labels (filename, folder, in-file, ROI, time-frequency ROI); stratified train/val/test splits; framing long signals; parallel processing; and shaping datastore output for `trainnet`. Triggers include "clean up this signal", "remove drift / detrend", "fill gaps", "remove spikes / outliers", "denoise", "resample to a uniform rate", "align channels", "labels from filenames", "stratified split", "prepare for Signal Labeler", and function names like `fillgaps`, `fillmissing`, `detrend`, `filloutliers`, `smoothdata`, `resample`, `synchronize`, `signalDatastore`, `labeledSignalSet`, `filenames2labels`, `folders2labels`, `splitlabels`, `framesig`, `framelbl`, `createDatastores`.
references/wf-denoise.md
View on GitHub# Workflow: wavelet denoising (the escalation beyond `smoothdata`/`sgolayfilt`)
> Functions used: `wdenoise` (Wavelet Toolbox), fallback `sgolayfilt` / `smoothdata`
Smoothing and denoising are one family - MATLAB groups `smoothdata`,
`sgolayfilt`, `medfilt1`, and friends under "Smoothing and Denoising". For a
broadband-noisy signal, do the smoothing there: the Step 3 matrix in
wf-detrend-smooth-deoutlier.md picks between `lowpass` (named cutoff),
`sgolayfilt` / `smoothdata("sgolay")` (features must survive), and
`smoothdata` (general).
This page is only the **wavelet escalation**: `wdenoise` sits outside that base
family (it needs Wavelet Toolbox) and is the reach-for when a tuned
`sgolayfilt` still cannot remove multi-scale noise without blurring features.
## When `wdenoise` earns the dependency
Reach for it only when ALL of these hold:
- The signal is genuinely non-stationary - features at very different scales,
bursts, changing character over time.
- A frame-length-tuned `sgolayfilt` still leaves noise you cannot remove
without blurring the features you care about.
- You can invest in choosing the wavelet and level (the defaults are not a
free win - see below).
Otherwise stay in the smoothing family (wf-detrend-smooth-deoutlier.md, Step 3).
`wdenoise` thresholds coefficients per scale, so it can keep a high-amplitude
transient while shrinking low-amplitude broadband noise. But with defaults
(`sym4`, Bayes) it often widens narrow pulses MORE than a well-chosen
`sgolayfilt`; the per-scale advantage shows up only when the wavelet and level
match the feature scale.
## Toolbox gate
`wdenoise` needs **Wavelet Toolbox** (a separate license, not SPT or base
MATLAB). Guard the call and fall back to `sgolayfilt` / `smoothdata` when the
license is absent; note the substitution in a script comment. Call
`wdenoise(x)` first (sensible defaults), then tune one knob at a time.
Signature and the full knob table: fn-wdenoise.md.
## Recipe
1. Confirm you are actually past what the smoothing family can do
(wf-detrend-smooth-deoutlier.md Step 3) - `wdenoise` is the escalation, not
the first reach.
2. Guard on the Wavelet Toolbox license; fall back to `sgolayfilt` if absent.
3. `wdenoise(x)` first, then tune wavelet / level / method one at a time
against a measured SNR or a visual overlay (fn-wdenoise.md).
4. Verify features survived; emit one runnable `.m` script with the guard.
## Related
- The smoothing/denoising family (the common path): wf-detrend-smooth-deoutlier.md, Step 3.
- `wdenoise` signature + knobs: fn-wdenoise.md.
----
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: 198k | Updated | Claude CodeCodex | Verified | Install |