set ns [new Simulator]set val(x) 1000set val(y) 1000set namtrace [open test.nam w]$ns namtrace-all-wireless $namtrace $val(x) $val(y)where,val(x) → x-coordinate dimensionval(y) → y-coordinate dimensionnamtrace → file handle for test.nam
namtrace → file handle for test.nam
ns → Simulator instance