function y = my_conv( x,h )
%
% function y = my_conv( x,h )用來計算y(n) = h(n)*x(n)的卷積
nx = length(x); nh = length(h);
y = zeros(1,nx+nh-1); % for index = 1:nx
% indexSum = x(index)*h;
% y(1,index:index+nh-1) = y(1,index:index+nh-1)+indexSum;
% end
for ib=1:nhfor index = 1:nx
% indexSum = x(index)*h;
% y(1,index:index+nh-1) = y(1,index:index+nh-1)+indexSum; y(index+ib-1)=y(index+ib-1)+x(index)*h(ib);end
end