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.mfile, run withrun_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.mfile — read the required cards first. StatePreflight: [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 tofiltfilt()or a linear‑phase design without the user’s intent. - No Hz designs without Fs. If
Fsis 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
.mfile first, then run withrun_matlab_file - If errors occur, edit the file and rerun — don't put all code inline in tool calls
More from matlab/skills
matlab-performance-optimizer
Optimize MATLAB code for better performance through vectorization, memory management, and profiling. Use when user requests optimization, mentions slow code, performance issues, speed improvements, or asks to make code faster or more efficient.
123matlab-live-script
Create MATLAB plain text Live Scripts (.m files) following specific formatting rules. Use when generating MATLAB scripts, educational MATLAB content, Live Scripts, or when the user requests .m files with rich text formatting.
64matlab-uihtml-app-builder
Build interactive web applications using HTML/JavaScript interfaces with MATLAB computational backends via the uihtml component. Use when creating HTML-based MATLAB apps, JavaScript MATLAB interfaces, web UIs with MATLAB, interactive MATLAB GUIs, or when user mentions uihtml, HTML, JavaScript, web apps, or web interfaces.
46matlab-test-creator
Create comprehensive MATLAB unit tests using the MATLAB Testing Framework. Use when generating test files, test cases, unit tests, or when the user requests testing for MATLAB code, functions, or classes.
23matlab-test-execution
Run MATLAB tests, analyze results, collect code coverage, and set up CI/CD pipelines. Use when executing tests, filtering test suites, debugging test failures, generating coverage reports, or configuring buildtool and CI systems for MATLAB projects.
20matlab-test-generator
Create comprehensive MATLAB unit tests using the MATLAB Testing Framework. Use when generating test files, test cases, unit tests, test suites, or when the user requests testing for MATLAB code, functions, or classes.
18