Wednesday, February 8, 2012

[ns] gnuplot

hello all

please it's the first one i use gnuplot to plot a graph of packet delivery
ratio, i have used this script awk, i have executed awk -f file.awk
file.tr>file.txt, but when i open it, i find nothing
please could u guide me, thanks in advance

BEGIN {
sends=0;
recvs=0;
}
{
# CALCULATE PACKET DELIVERY FRACTION
if(( $1 == "s")&& ( $35 == "cbr" ) && ( $19=="AGT" )) { sends+=1; }
if(( $1 == "r")&& ( $35 == "cbr" ) && ( $19=="AGT" )) { recvs+=1; }
}
END {
for ( i in end_time )
{
start = start_time[i];
end = end_time[i];
}
PDF = (recvs/sends)*100;
printf("PDF = %.2f\n",PDF);
}
--
View this message in context: http://old.nabble.com/gnuplot-tp33287834p33287834.html
Sent from the ns-users mailing list archive at Nabble.com.

No comments:

Post a Comment

Counter

blogger analytics