function C = multi_block_product(A, B)
%MULTI_BLOCK_PRODUCT Summary of this function goes here
%   Detailed explanation goes here

[m, n] = size(A);
[p, q] = size(B);

% Number of blocks
k = p / n;
r = m / k;

C = zeros(k*r, q);

for i = 1 : n
    for j = 1 : q
        C(:, j) = C(:, j) + A(:, i) .* kron(B(i+n*(0:k-1),j), ones(r, 1));
    end
end

end

