matlab-digital-filter-design

Installation
SKILL.md

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
Related skills

More from matlab/skills

Installs
59
Repository
matlab/skills
GitHub Stars
100
First Seen
Jan 26, 2026