Question: function yy = firfilt(bb, xx) if( length(bb)==1 ) yy = bb(1)*xx; elseif( length(xx)==1 ) yy = xx(1)*bb; elseif ndims(xx)==2 %- Every MATLAB matrix has at
function yy = firfilt(bb, xx)
if( length(bb)==1 ) yy = bb(1)*xx; elseif( length(xx)==1 ) yy = xx(1)*bb; elseif ndims(xx)==2 %- Every MATLAB matrix has at least dim=2 if min(size(bb))>1 error('>>>FIRFILT: filter coefficients cannot be a matrix') elseif min(size(xx))>1 warning('>>>FIRFILT: filtering the columns of the matrix xx') xx( size(xx,1)+length(bb)-1,1 ) = 0; %-- force filter() to make all of y[n] yy = filter( bb, 1, xx ); elseif( length(bb)>>FIRFILT: does not work for more than two dimensions') end

Use the function firfilt( ) to implement the following FIR filter on the input signal x[n] defined via the MATLAB statement: xx you must define the vector of filter coefficients bb needed in firfilt. 256* (rem (0:100, 50)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
