Electrical resource!

Monday, December 18, 2006

Convolution Using Matlab 7.0

The questions might be arising in your minds that..
* What is convolution?
* how we can write the program for convolution?
Convolution is the point to point multiplication add and drag process.when some signal is passed through some system then this system has some impulse response denoted by h(x), and our original signal is denoted by 'X' .Then we can write convolution as,
'f(X)=X*h(x)'
To write the program for convolution in matlab just copy the following coding and paste it in matlab empty file!
Matlab coding for Convolution!

'p(x)=(1+2x+3x^2+5x^4)(1-3x-x^2+x^3+3x^4)'
x=32*[5 3 2 1]
n=0:1:3
figure(1)
axis equal
stem(n,x,'linewidth',2.5)
xlabel('Sample Time')
ylabel('Amplitude')
title('INPUT SIGNAL')
grid
h=[3 1 -1 -3 1]
n=0:1:4
figure(2)
axis equal
stem(n,h,'linewidth',2.5)
xlabel('Sample Time')

1 Comments:

Blogger Amin Shahriz said...

why not just use conv() ? we got convolution function right?

1:32 AM  

Post a Comment

<< Home

eXTReMe Tracker