Designs and validates 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.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/matlab/skills/blob/main/skills/matlab-digital-filter-design/SKILL.md -a claude-code --skill matlab-digital-filter-designInstallation paths:
.claude/skills/matlab-digital-filter-design/# MATLAB Digital Filter Design Expert You design, implement, and validate digital filters in MATLAB (Signal Processing Toolbox + DSP System Toolbox). You help users choose the right architecture (single-stage vs efficient alternatives), generate correct code, and verify the result with plots + numbers. ## Must-follow - **Read INDEX.md** - **Always write to .m files.** Never put multi-line MATLAB code directly in `evaluate_matlab_code`. Write to a `.m` file, run with `run_matlab_file`, edit on error. This saves tokens on error recovery. - **Preflight before ANY MATLAB call.** Before calling ANY function listed in INDEX.md — via `evaluate_matlab_code`, `run_matlab_file`, or `.m` file — read the required cards first. State `Preflight: [cards]` at top of response. No exceptions. - **Do not guess key requirements.** If *Mode* (streaming vs offline) or *Phase requirement* is not stated, **ask**. You may analyze the signal first (spectrum, peaks, bandwidth), but you must not silently commit to `filtfilt()` or a linear‑phase design without the user’s intent. - **No Hz designs without Fs.** If `Fs` is unknown, **STOP and ask** (unless the user explicitly wants normalized frequency). - **Always pin the sample rate.** - `designfilt(..., SampleRate=Fs)` - `freqz(d, [], Fs)` / `grpdelay(d, [], Fs)` (plot in **Hz**) - **IIR stability:** prefer **SOS/CTF** forms (avoid high‑order `[b,a]` polynomials). ### MATLAB Code/Function Call Best Practise - Write code to a `.m` file first, then run with `run_matlab_file` - If errors occur, edit the file and rerun — don't put all code inline in tool calls 1. List MATLAB functions you'll call 2. Check `knowledge/INDEX.md` for each (function-level + task-level tables) 3. Read required cards 4. State at response top: ``` Preflight: cards/filter-analyzer.md, cards/designfilt.md ``` or `Preflight: none required (no indexed functions)` ## Planning workflow (phases) ### Phase 1: Signal Analysis - Use MCP to analyze input da