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: outerProd.m
    path of file: ./repos/chebfun/@chebfun3
    
    the code of the file until where you have to start completion: function T = outerProd(A, B)
%OUTERPROD   Outer product 
%   OUTERPROD(A, B) computes outer product of the matrix A and the vector B
%   or a vector A and a matrix B. Both A and B are discrete.
%
%   Example:

    
function T = outerProd(A, B)
%OUTERPROD   Outer product 
%   OUTERPROD(A, B) computes outer product of the matrix A and the vector B
%   or a vector A and a matrix B. Both A and B are discrete.
%
%   Example:
%   A = rand(4,1); 
%   B = rand(3,2);
%   T = outerProd(A, B);       % T will be 4 x 1 x 3 x 2.
%
% See also CHEBFUN3/TXM.

% The structure of this code is similar to `ttt.m` from the HTUCKER toolbox
% of Tobler and Kressner.

% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

% Determine number of dimensions in the inputs:
ndimsA = ndims(A);
ndimsB = ndims(B);

% Determine sizes of the inputs:
sizeA = size(A);
sizeA(end