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: multihop_transmission.m
    path of file: ./repos/wsn-heterogenous-deployment/Particle Swarm Optimization/multihop routing
    
    the code of the file until where you have to start completion: function lifetime = multihop_transmission(x, y, en, SinkX, SinkY, nn_dist, mv)

    
function lifetime = multihop_transmission(x, y, en, SinkX, SinkY, nn_dist, mv)
%DIRECT_TRANSMISSION Summary of this function goes here
%   Detailed explanation goes here
    lifetime = 0;
    n = size(x, 2);
    energy = 0;
    dist_direct(1 : n) = 0;
    dead = 0;
    Rounds = 0;

    
    Elec = 50*0.000000001; % Eelec = 50nJ/bit energy tranfer and receive
    Efs = 10*0.000000000001 ;% energy free space
    Emp = 0.0013*0.000000000001; %energy multi path
    Kbit = 2000; % size  
    Eda=5*0.000000001; %Data Aggregation Energy
    
    d0 = sqrt(Efs / Emp);
    
    for i = 1 : n
            dist_direct(i)= sqrt( (x(i)-SinkX)^2 + (y(i)-SinkY)^2 );
    end