impulse response matlab

Status
Not open for further replies.

dev_000

Newbie level 3
Joined
Dec 12, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308
can plz anyone tell how to do this in matlab??
obtain the filtered ouptut of an FIR filter whose impulse response is {0,0,0,1,0,0,0}(origin at 1) and input{1,2,3,2,1}(origin at 3)
 

matlab impulse response

You can find out the solution theoretically, because your impulse response is just a dirac function at n = 0. So, the output of the filter will be the same as the input.

Take a look at the code:

h = [0,0,0,1,0,0,0];
x = [1,2,3,2,1];
y = conv(h,x);

Note: the filtering process is actually a convolution, so you can use the conv function to do what is needed.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…