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: size.m
    path of file: ./repos/scGEAToolbox/tensor_toolbox/@ttensor
    
    the code of the file until where you have to start completion: function m = size(t, idx)
%SIZE Size of a ttensor.
%
%   D = SIZE(T) returns the size of the tensor.
%
%   I = size(T,DIM) returns the size of the dimension specified by
%   the scalar DIM.

    
function m = size(t, idx)
%SIZE Size of a ttensor.
%
%   D = SIZE(T) returns the size of the tensor.
%
%   I = size(T,DIM) returns the size of the dimension specified by
%   the scalar DIM.
%
%   See also TTENSOR, TTENSOR/NDIMS.
%
%Tensor Toolbox for MATLAB: <a href="https://www.tensortoolbox.org">www.tensortoolbox.org</a>


if ndims(t) == 0
    m = [];
end