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: lmlra.m
    path of file: ./repos/imtsl/libs/tensorlab
    
    the code of the file until where you have to start completion: function [U,S,output] = lmlra(T,size_core,S0,options)
%LMLRA Low multilinear rank approximation.
%   [U,S,output] = lmlra(T,size_core) computes the factor matrices U{1},
%   ..., U{N} and core tensor S of dimensions size_core belonging to a low
%   multilinear rank approximation of the N-th order tensor T.
%
%   [U,S,output] = lmlra(T,U0,S0) allows the user to provide initial factor
%   matrices U0 and core tensor S0, to be used by the main algorithm.
%   Factor matrices equal to the empty matrix [] will be initialized using
%   the chosen initialization method.
%
%   The structure output contains the output of the selected algorithms:
%
%      output.Initialization - The output of the initialization step.
%      output.Algorithm      - The output of the main algorithm.
%

    
function [U,S,output] = lmlra(T,size_core,S0,options)
%LMLRA Low multilinear rank approximation.
%   [U,S,output] = lmlra(T,size_core) computes the factor matrices U{1},
%   ..., U{N} and core tensor S of dimensions size_core belonging to a low
%   multilinear rank approximation of the N-th order tensor T.
%
%   [U,S,output] = lmlra(T,U0,S0) allows the user to provide initial factor
%   matrices U0 and core tensor S0, to be used by the main algorithm.
%   Factor matrices equal to the empty matrix [] will be initialized using
%   the chosen initialization method.
%
%   The structure output contains the output of the selected algorithms:
%
%      output.Initialization - The output of the initialization step.
%      output.Algorithm      - The output of the main algorithm.
%
%   lmlra(T,size_core,options) and lmlra(T,U0,S0,options) allow the user to
%   choose which algorithms will be used in the different steps and also
%   set parameters for those algorithms:
%
%      Use options.Initialization = [{@lmlra_aca}|@lmlra_rnd|@mlsvd] to
%      choose the initialization method. By default, an adaptive cross
%      approximation algorithm is used. The variable
%      options.InitializationOptions will be passed to the chosen 
%      initialization method as third argument.
%
%      Use options.Algorithm = [@lmlra_hooi|@lmlra_minf|{@lmlra_nls}| ...
%      lmlra3_dgn|lmlra3_rtr] to choose the main algorithm. The structure
%      options.AlgorithmOptions will be passed to the chosen algorithm.
%
%   Further options are:
%
%      options.Display = false - Set to true to enable printing output
%                                information to the command line.
%
%   See also mlrankest, lmlragen, lmlraerr.

%   Authors: Laurent Sorber (Laurent.Sorber@cs.kuleuven.be)
%            Marc Van Barel (Marc.VanBarel@cs.kuleuven.be)
%            Lieven De Lathauwer (Lieven.DeLathauwer@kuleuven-kulak.be)

% Gather some input information.
T = fmt(T);
N = length(size_core);
if nargin < 3, S0 = []; end