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

 function yy = firfilt(bb, xx) if( length(bb)==1 ) yy = bb(1)*xx;

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!