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: bob_addPathSegment.m
    path of file: ./repos/ethx-autonomous-mobile-robot/exercise/exercise2/code/common/vrep
    
    the code of the file until where you have to start completion: function bob_addPathSegment(connection,x0,y0,x1,y1)
    global isoctave;
    if ~isoctave
        signalValue=connection.vrep.simxPackFloats([x0,y0,x1,y1]);
        connection.vrep.simxSetStringSignal(connection.clientID,strcat('Bob_reqAddPathSeg',num2str(connection.robotNb)),signalValue,connection.vrep.simx_opmode_oneshot);

    
function bob_addPathSegment(connection,x0,y0,x1,y1)
    global isoctave;
    if ~isoctave
        signalValue=connection.vrep.simxPackFloats([x0,y0,x1,y1]);
        connection.vrep.simxSetStringSignal(connection.clientID,strcat('Bob_reqAddPathSeg',num2str(connection.robotNb)),signalValue,connection.vrep.simx_opmode_oneshot);
    else
        signalValue=simxPackFloats([x0,y0,x1,y1]);
        simxSetStringSignal(connection.clientID,strcat('Bob_reqAddPathSeg',num2str(connection.robotNb)),signalValue,connection.vrep.simx_opmode_oneshot);
    end