function res = forney_ex(x, y, m)

len_y = length(y); len_x = length(x);
len_res = len_x+len_y-1;
res = zeros(1,len_res);
for i = 1:len_y
    for j=1:len_x
        res(j+i-1) = mod(res(j+i-1) + y(i),m); 
    end
end
