  function C = strass(A,B)
%
% Pre:
%   A,B  n-by-n matrices, n a power of 2.
%  nmin  positive integer

% Post:
%     C  n-by-n matrix equal to A*B. 
%    
  [n,n] = size(A);
  if n <= 16
     C = A*B;
  else
     m = n/2; u = 1:m; v = m+1:n;
      
	 P1 = strass(A(u,u)+A(v,v),B(u,u)+B(v,v));
     P2 = strass(A(v,u)+A(v,v),B(u,u));
     P3 = strass(A(u,u),B(u,v)-B(v,v));
     P4 = strass(A(v,v),B(v,u)-B(u,u));
     P5 = strass(A(u,u)+A(u,v),B(v,v));
     P6 = strass(A(v,u)-A(u,u),B(u,u) + B(u,v));
     P7 = strass(A(u,v)-A(v,v),B(v,u)+B(v,v));
     C = [ P1+P4-P5+P7   P3+P5; P2+P4 P1+P3-P2+P6];
  end
