What problem does it solve?
Fixed-point MATLAB code using fi objects often suffers from slow simulation, bloated generated C code, and subtle correctness bugs like unintended word-length growth. This Skill applies an 11-point checklist to detect these antipatterns and suggest idiomatic fixes.
Core Features & Use Cases
- Performance Review: Detects scalar fi() calls in loops, missing preallocation, and slow name-value constructors, recommending vectorization and numerictype prototypes.
- Code Generation Efficiency: Evaluates fimath settings (rounding, overflow, product/sum modes) against C, DSP, or FPGA targets, and flags division and transcendental functions that generate inefficient code.
- Correctness & Patterns: Identifies missing subscripted assignment that causes accumulator bit growth, hardcoded types that should be separated into types tables, and misuse of quantizenumeric versus fi.
- Use Case: Before generating C code with MATLAB Coder from a fixed-point FIR filter, run this review to catch default fimath bloat, unvectorized fi construction, and division operations that would inflate the generated code.
Quick Start
Review my MATLAB file for fixed-point fi best practices and report any performance, code generation, or correctness issues.