function y = MatVecF(A,x)
%
 [m,n] = size(A);
 y = zeros(m,1);
 for i=1:m
    y(i) = A(i,:)*x;
 end
end

function y = MatVecC(A,x)
%
 [m,n] = size(A);
 y = zeros(m,1);
 for j=1:n
    y = y + A(:,j)*x(j);
 end
end

function y = VecMatC(x,A)
%
 [m,n] = size(A);
 y = zeros(1,n);
 for j=1:n
    y(j) = y(j) + x*A(:,j);
 end
end
   
function y = VecMatF(x,A)
%
 [m,n] = size(A);
 y = zeros(1,n);
 for j=1:m
    y = y + x(j)*A(j,:);
 end;
end

function C = MatMatInt(A,B)
%
 [m,r] = size(A);
 [r,n] = size(B);
 C = zeros(m,n);
 for j=1:n
    for i=1:m
      C(i,j) = A(i,:)*B(:,j);
    end
 end
end

function C = MatMatVec(A,B)
%
 [m,r] = size(A);
 [r,n] = size(B);
 C = zeros(m,n);
 for j=1:n
    C(:,j) = A*B(:,j);
 end
end

function C = MatMatExte(A,B)
%
 [m,r] = size(A);
 [r,n] = size(B);
 C = zeros(m,n);
 for k=1:r
    C = C + A(:,k)*B(k,:);
 end
end






