Clear Filters
Clear Filters

Convolution of two signals

1 view (last 30 days)
Diogo Costa
Diogo Costa on 7 Dec 2020
Hello, can anyone explain me this part of the code, i don't understand very well when starts the for
m=length(x);
n=length(h);
X=[x,zeros(1,n)];
H=[h,zeros(1,m)];
for i=1:n+m-1
Y(i)=0;
for j=1:m
if(i-j+1>0)
Y(i)=Y(i)+X(j)*H(i-j+1);
else
end
end
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!