Walk through the mathematical formulation of a finite impulse response (FIR) filter and how you would implement it in Matlab and Python.