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: PSO.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: % Particle swarm optimization 
% References :
%    Copyright (c) 2015, Yarpiz
%    All rights reserved.


function out = PSO(problem, par
    
function out = PSO(problem, params,x,y,SinkX,SinkY,n,nod)

   
    nVar = problem.nVar;        % Number of Unknown (Decision) Variables

    VarSize = [1 nVar];         % Matrix Size of Decision Variables

    
    for i=1:n
        en(i)=0.5;
    end