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: setDefaults.m
    path of file: ./repos/ONSAS/src/utils
    
    the code of the file until where you have to start completion: % Copyright 2023, Jorge M. Perez Zerpa, Mauricio Vanzulli.
%
% This file is part of ONSAS.
%
% ONSAS 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.
%
% ONSAS 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 ONSAS.  If not, see <https://www.gnu.org/licenses/>.
 
%md set optional fields defaults
function [ materials, elements, boundaryConds, analysisSettings, otherParams ] = setDefaults( materials, elements, boundaryConds, analysisSettings, otherParams )

% =========================================
% materials
materials         = checkOrSetDefault ( materials        , 'density'       , 0   ) ;


% =========================================
% elements
elements = checkOrSetDefault( elements, 'massMatType'        , 'lumped' ) ;
elements = checkOrSetDefault( elements, 'elem
    
function [ materials, elements, boundaryConds, analysisSettings, otherParams ] = setDefaults( materials, elements, boundaryConds, analysisSettings, otherParams )

% =========================================
% materials
materials         = checkOrSetDefault ( materials        , 'density'       , 0   ) ;


% =========================================
% elements
elements = checkOrSetDefault( elements, 'massMatType'        , 'lumped' ) ;
elements = checkOrSetDefault( elements, 'elemTypeParams'     , [] ) ;
elements = checkOrSetDefault( elements, 'elemCrossSecParams' , [] ) ;
elements = checkOrSetDefault( elements, 'chordVector'        , []         ) ;
elements = checkOrSetDefault( elements, 'aeroCoefFunctions'  , {[],[],[]} ) ;
elements = checkOrSetDefault( elements, 'aeroNumericalParams', {4, false, true} ) ;

elements = setDefauAeroCrossSecProps( elements );


% =========================================
% boundaryConds
boundaryConds    =  checkOrSetDefault ( boundaryConds    , 'loadsTimeFact' , [] ) ;
boundaryConds    =  checkOrSetDefault ( boundaryConds    , 'loadsCoordSys' , [] ) ;
boundaryConds    =  checkOrSetDefault ( boundaryConds    , 'springDofs' , [] ) ;

% =========================================
% analysisSettings
analysisSettings  = checkOrSetDefault ( analysisSettings , 'geometricNonLinearAero' , true            ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'fluidProps'             , []              ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'addedMassBool'          , false           ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'booleanSelfWeight'      , false           ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'Utp10'                  , []              ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'methodName'             , 'newtonRaphson' ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'deltaT'                 , 1               ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'finalTime'              , 1               ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'stopTolDeltau'          , 1e-6            ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'stopTolForces'          , 1e-6            ) ;
analysisSettings  = checkOrSetDefault ( analysisSettings , 'stopTolIts'             , 15              ) ;
if strcmp( analysisSettings.methodName, 'newmark' )
  analysisSettings = checkOrSetDefault( analysisSettings , 'alphaNM', 0.25 ) ;
  analysisSettings = checkOrSetDefault( analysisSettings , 'deltaNM', 0.50 ) ;
end