Systems Analysis Using MATLAB
Systems Analysis Using MATLAB
MATLAB
Convolution
:
:. .
Convolution
Convolution (folding together) is a complicated operation involving
integrating, multiplying, adding, and time-shifting two signals together.
The convolution a * b of two functions a and b is defined as the function:
conv
deconv
conv2
-------------------------Example:
a(s) = s2 + 2s + 3
b(s) = 4s2 + 5s + 6
-9
-1
EXAMPLE
Convolution of X=cos(n^2)*sin(2*pi*n/5)*u(t) and
h=((0.9)^n)*(u(t)-u(t-10)) using MATLAB:
n=0:99;
unit=ones(1,100);
unit_10=[ones(1,11) zeros(1,89)];
h=((0.9).^n).*unit_10;
x=cos(n.^2).*sin(2*pi*n/5).*unit;
y=conv(x,h);
subplot(2,2,1);
stem(n,x);
subplot(2,2,2);
stem(n,h);
subplot(2,2,3);
stem(n,y(1:100));
2D Covolution
C = conv2(A,B)