- ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- need to know tcl script programming
If you mean ns2 related tcl commands, then start with the Famous ns2 Tutorial by Marc Greis
ns-allinone-2.28ns-2.28ns-tutorial
You may find some examples under ns2 directory.
ns-allinone-2.28ns-2.28ns-tutorialexamples
ns-allinone-2.28ns-2.28tclex
You can learn tcl from tutorials available in internet.
Since tcl is a interpreted programming language, actually there is no compilation step. Just you can directly run your tcl script (here the ns2 simulation script) by using the ns2 interpreter as follows.
$ns program.tcl
thanks alot sir .i need to know how to use xgraph in ns2 and how do i set it in my directory?
Set the environment variables in .bash_profile in the home directory of the user(the directory in which you are in after the login process). It is a hidden file so to see the file use
#ls –a
edit it using vi editor
#vi .bash_profile
add the necessary environment variables
(refer the last pages of install script of ns2 – the file ns-allinone-2.28ns-2.28 install)
If you do it properly, then xgraph and other executables of ns2 can be accessed from any diroctory.
To show a graph for two column data file test.dat, run the command as follows.
#xgraph test.dat
Discuss Through WhatsApp