clc; clear; close all; load('new_Parameter'); line=[]; line_head=1; line_tail=1; S=[]; line(line_tail)=0; while line_tail<=node_number x=unifrnd(0,xlim); y=unifrnd(0,ylim); for i=1:1:line_tail if line(i)==0 dis=sqrt((sink.x-x)^2+(sink.y-y)^2); if dis