## Author: M. Turhan ÇOBAN
## Created: 2021-11-07

function retval = city(x,y,id)
  n=length(x);
     function total=distance()
       total=0.0;
       n=length(x);
       for i=1:n-1
         x1=x(id(i+1))-x(id(i));
         y1=y(id(i+1))-y(id(i));
         total=total+sqrt(x1*x1+y1*y1);
       endfor
     endfunction 
     retval=distance();
endfunction
