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: ft_struct2single.m
    path of file: ./repos/fecgsyn/subfunctions/data-generation/libs/fieldtrip/utilities
    
    the code of the file until where you have to start completion: function [x] = ft_struct2single(x, maxdepth)

% FT_STRUCT2SINGLE converts all double precision numeric data in a structure

    
function [x] = ft_struct2single(x, maxdepth)

% FT_STRUCT2SINGLE converts all double precision numeric data in a structure
% into single precision, which takes up half the amount of memory compared
% to double precision. It will also convert plain matrices and cell-arrays.
%
% Use as
%   x = ft_struct2single(x)
%
% Starting from MATLAB 7.0, you can use single precision data in your
% computations, i.e. you do not have to convert back to double precision.
%
% MATLAB version 6.5 and older only support single precision for storing
% data in memory or on disk, but do not allow computations on single
% precision data. After reading a single precision structure from file, you
% can convert it back with FT_STRUCT2DOUBLE.
%
% See also FT_STRUCT2DOUBLE, FT_STRUCT2CHAR, FT_STRUCT2STRING

% Copyright (C) 2005-2014, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
%    FieldTrip is free software: you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation, either version 3 of the License, or
%    (at your option) any later version.
%
%    FieldTrip is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

if nargin<2
  maxdepth = inf;
end