The filterfirdf implements the FIR direct form structure.
(a) Develop a new MATLAB function y=filterfirlp(h,x) that implements the FIR linear-phase form given its impulse response in h. This function should first check if h is one of type-I through type-IV and then simulate the corresponding (9.41) through (9.44) equations. If h does not correspond to one of the four types then the function should display an appropriate error message.
(b) Verify your function on each of the following FIR systems:
For verification determine the first ten samples of the step responses using your function and compare them with those from the filter function.