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: ptoClass.m
    path of file: ./repos/WEC-Sim/source/objects
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
function obj = ptoClass(name)                                  
            % This method initilizes the ``ptoClass`` and creates a
            % ``pto`` object.          
            %
            % Parameters
            % ------------
            %     filename : string
            %         String specifying the name of the pto
            %
            % Returns
            % ------------
            %     pto : obj
            %         ptoClass object         
            %
            if exist('name','var')
                obj.name = name;
            else
                error('The pto class number(s) in the wecSimInputFile must be specified in ascend