matlab/matlab-design-digital-filter
> 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.
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-design-digital-filter
Design, implement, and validate digital filters using Signal Processing Toolbox and DSP System Toolbox. Choose the right architecture (single-stage vs efficient alternatives), generate correct code, and verify the result with plots and numbers.
evaluate_matlab_code. Write to a .m file, run with run_matlab_file, edit on error.Preflight: [files] at the top of the response.Fs is unknown, stop and ask (unless the user explicitly wants normalized frequency).designfilt(..., SampleRate=Fs) and freqz(d, [], Fs).[b,a] polynomials).references/INDEX.md for each (function-level + task-level tables)Preflight: quick-ref/filter-analyzer.md, quick-ref/designfilt.md (or Preflight: none required)trans_pct and identify interference characteristicsAfter signal analysis, ask Mode + Phase if not stated:
Wait for answer before showing any approach comparison or overview.
references/efficient-filtering.md if trans_pct < 2%Fs (Hz)If any item is missing, ask.
Rp_dB passband ripple (default 1 dB), Rs_dB stopband attenuation (default 60 dB)If Mode or Phase is unknown, ask 1-2 clarifying questions and stop.
Compute and state before finalizing an approach:
trans_bw = Fstop - Fpasstrans_pct = 100 * trans_bw / FsM_max = floor(Fs/(2*Fstop)) (only meaningful for lowpass-based multirate)Decision rule:
trans_pct > 5% -- single-stage FIR or IIR is usually fine2% <= trans_pct <= 5% -- single-stage possible; mention efficient alternatives if cost/latency matterstrans_pct < 2% -- stop and do a narrow-transition comparison (see references/quick-ref/efficient-filtering.md)designfilt choose minimum order, then query filtord(d). Optionally use kaiserord/firpmord for FIR length estimates.designfilt() with explicit Rp/Rs and SampleRate=Fs. Streaming IIR: use SystemObject=true. Offline zero-phase: filtfilt() is allowed but state that it squares the magnitude response.filterAnalyzer() for comparing 2+ designs. Read references/quick-ref/filter-analyzer.md first. Minimum displays: magnitude + group delay.filtfilt(), verify the effective response (magnitude squared).| Function | Purpose |
|----------|---------|
| designfilt() | Primary filter design (FIR and IIR, all response types) |
| filterAnalyzer() | Visual comparison of 2+ filter designs |
| freqz(), grpdelay() | Frequency response and group delay analysis |
| filtfilt() | Zero-phase offline filtering |
| dsp.SOSFilter | Streaming IIR via SystemObject=true |
| designMultirateFIR() | Multirate decimator/interpolator design |
| ifir() | Interpolated FIR for narrow transitions at constant rate |
| cost() | MPIS (MultiplicationsPerInputSample) on DSP System objects |
| kaiserord(), firpmord() | FIR order estimation |
SampleRate=Fs in designfilt() and plot in Hz with freqz(d, [], Fs)filterAnalyzer() for multi-filter comparison, not custom freqz/grpdelay plots[b,a] for order > 8)tiledlayout/nexttile for multi-panel figures (not subplot)----
Copyright 2026 The MathWorks, Inc.
----
Take matlab/matlab-design-digital-filter from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.