You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: testMULTIPROD.m
    path of file: ./repos/Swan/Other/Utilities/Multiprod_2009/Testing
    
    the code of the file until where you have to start completion: function testMULTIPROD
% TESTMULTIPROD  Testing function MULTIPROD
%    To perform a series of tests of function MULTIPROD, use
%    TESTMULTIPROD (without arguments)

global numberofchecks  min_of_all_e  max_of_all_e  syntaxes

format compact;
min_of_all_e = 0;
max_of_all_e = 0;
Nsyn = 11; % Number of MULTIPROD syntaxes
syntaxes = '     1    1s   1xs    2a    2b    3a    3b   4ab   4abs   4b    4c';
numberofchecks = zeros(1, Nsyn);

% Initial size of matrices
% (Q = R required, unless P=Q=1 or R=S=1)
p=6; q=3;
r=3; s=4;

% 0 singletons
    check ([p q], [r s]);

% 1 singleton
      check ([1 q], [r s]);
    % check ([p 1], [r s]); % Not allowed
    % check ([p q], [1 s]); % Not allowed
      check ([p q], [r 1]);

% 2 singletons
      check ([1 1], [r s]);
      check ([p q], [1 1]);
      check ([1 q], [r 1]); % inner product
      check ([p 1], [1 s]); % outer product
    % check ([1 q], [1 s]); % Not allowed
    % check ([p 1], [r 1]); % Not allowed

% 3 singletons
    check ([1 1], [1 s]);
    check ([1 1], [r 1]);
    check ([1 q], [1 1]);
    check ([p 1], [1 1]);

% 4 singletons
    check ([1 1], [1 1]);

% EMPTY MATRICES    
%-------------------------------------------

% 0 singletons
    check ([0 q], [r s]);
    check ([p q], [r 0]);
    check ([p 0], [0 s]);
    check ([0 0], [0 s]);
    check ([p 0], [0 0]);
    check ([0 0], [0 0]);

% 1 singleton
      check ([1 q], [r 0]);
      check ([1 0], [0 s]);
      check ([1 0], [0 0]);
    % check ([p 1], [r s]); % Not allowed
    % check ([p q], [1 s]); % Not allowed
      check ([0 q], [r 1]);
      check ([p 0], [0 1]);
      check ([0 0], [0 1]);

% 2 singletons
      check ([1 1], [0 s]);
      check ([1 1], [r 0]);
      check ([1 1], [0 0]);

      check ([0 q], [1 1]);
      check ([p 0], [1 1]);
      check ([0 0], [1 1]);

    
function testMULTIPROD
% TESTMULTIPROD  Testing function MULTIPROD
%    To perform a series of tests of function MULTIPROD, use
%    TESTMULTIPROD (without arguments)

global numberofchecks  min_of_all_e  max_of_all_e  syntaxes

format compact;
min_of_all_e = 0;
max_of_all_e = 0;
Nsyn = 11; % Number of MULTIPROD syntaxes
syntaxes = '     1    1s   1xs    2a    2b    3a    3b   4ab   4abs   4b    4c';
numberofchecks = zeros(1, Nsyn);

% Initial size of matrices
% (Q = R required, unless P=Q=1 or R=S=1)
p=6; q=3;
r=3; s=4;

% 0 singletons
    check ([p q], [r s]);

% 1 singleton
      check ([1 q], [r s]);
    % check ([p 1], [r s]); % Not allowed
    % check ([p q], [1 s]); % Not allowed
      check ([p q], [r 1]);

% 2 singletons
      check ([1 1], [r s]);
      check ([p q], [1 1]);
      check ([1 q], [r 1]); % inner product
      check ([p 1], [1 s]); % outer product
    % check ([1 q], [1 s]); % Not allowed
    % check ([p 1], [r 1]); % Not allowed

% 3 singletons
    check ([1 1], [1 s]);
    check ([1 1], [r 1]);
    check ([1 q], [1 1]);
    check ([p 1], [1 1]);

% 4 singletons
    check ([1 1], [1 1]);

% EMPTY MATRICES    
%-------------------------------------------

% 0 singletons
    check ([0 q], [r s]);
    check ([p q], [r 0]);
    check ([p 0], [0 s]);
    check ([0 0], [0 s]);
    check ([p 0], [0 0]);
    check ([0 0], [0 0]);

% 1 singleton
      check ([1 q], [r 0]);
      check ([1 0], [0 s]);
      check ([1 0], [0 0]);
    % check ([p 1], [r s]); % Not allowed
    % check ([p q], [1 s]); % Not allowed
      check ([0 q], [r 1]);
      check ([p 0], [0 1]);
      check ([0 0], [0 1]);

% 2 singletons
      check ([1 1], [0 s]);
      check ([1 1], [r 0]);
      check ([1 1], [0 0]);

      check ([0 q], [1 1]);
      check ([p 0], [1 1]);
      check ([0 0], [1 1]);

      check ([1 0], [0 1]); % inner product
      check ([0 1], [1 s]); % outer product
      check ([p 1], [1 0]); % outer product
      check ([0 1], [1 0]); % outer product
    % check ([1 q], [1 s]); % Not allowed
    % check ([p 1], [r 1]); % Not allowed

% 3 singletons
    check ([1 1], [1 0]);
    check ([1 1], [0 1]);
    check ([1 0], [1 1]);
    check ([0 1], [1 1]);

disp ' '
disp '------------------------------------------------------------------'
disp ' '
fprintf 'Total number of checked multiproducts:', disp (sum(numberofchecks))
disp ' ', disp 'Number of checked multiproducts for each syntax:'
disp (syntaxes)
str = ('%6.0f')';
str = str(:, ones(1,Nsyn));
formatstr = [str(:)' '\n'];
fprintf(1, formatstr, numberofchecks);
disp ' '
disp ( ['Minimun error:    ' num2str(min_of_all_e)] )
disp ( ['Maximum error:    ' num2str(max_of_all_e)] )
disp ( ['MATLAB precision: ' num2str(eps)] )


%--------------------------------------------------------------------------
function check(blsizeA, blsizeB)

if     all(blsizeA==1), blsizeC = blsizeB; % scalars in A
elseif all(blsizeB==1), blsizeC = blsizeA; % scalars in B
else                    blsizeC = [blsizeA(1) blsizeB(2)]; % No scalars
end