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: BodyConfig.m
    path of file: ./repos/paper-simulation/Farivarnejad2018Stability/+pkgMechanics
    
    the code of the file until where you have to start completion: % Body Configure class (2 inputs: inputInertia(1x1),inputPosition(mx1))
% (last
    
function obj = BodyConfig(inputInertia,inputPosition)
            if nargin==0
                % default initiation with dimension 1
                obj.inertia = 0;
                obj.position = 0;
                obj.velocity = 0;
            else
                if nargin>=2
                    if isscalar(inputInertia)&&isvector(inputPosition)
                        obj.inertia = inputInertia;
                        obj.position = inputPosition(:);
                        obj.velocity = zeros(size(inputPosition(:)));
                    else
                        error('Varargin Error: Input size should be 1x1(inputInertia) and mx1(inputPosition).')
                    end