%-----------------------------------------------------------------------
function C = MatMatOuter(A,B)
% C = MatMatOuter(A,B)
% computes matrix*matrix product C = A*B (via outer products) where
% A is an mXp matrix, B a pXn matrix.
[m,p] = size(A);
[p,n] = size(B);
C = zeros(m,n);
for k = 1:p
   % Add-in k-th outer product
   C = C + A(:,k)*B(k,:);
end
%
%
%
%        6                   8             6
%  /------\         / ----$--- \     /------\
%  |------|   _8_   | ----$--- |     |------|
%  |------|   \     | ----$--- |     |------|
%  |------| =  >    | ----$--- |     |------|
%  |------|   /__   | ----$--- |  *  |$$$$$$|k=5
%  |------|   k=1   | ----$--- |     |------|
% 7\------/        7\ ----$--- /     |------|
%                         k=5       8\------/
