NS-2相关工具大体介绍<2>

2.绘图工具gnuplot,是一个命令驱动的交互式画图软件,功能是把数据资料和数学函数转换成容易观察的平面或立体的图形

这个工具是很有用的,在仿真中很有用处,下面介绍在Linux下的使用

直接输入gnuplot 进入交互式方式 要是想退出输入exit或quit命令即可

命令格式:gnuplot file1 file2

(1) 简单绘图

plot [0:10] sin (x) + 0.1*x    //运行截图如下


(2)有个文件叫TEST.DATA里面的数据为

#注释
0.1 0.01 -2.303
0.2 0.04 -1.609
0.5 0.25 -0.593
1 1
2 4 0.693 
3 9 1.099 
4 16 1.386 


5 25 1.609 
6 36 1.792 
7 49 1.946 
8 64 2.078 
9 81 2.197

==================

运行命令: plot 'TEST.DATA'  出现一下截图  运行如下命令 plot 'TEST.DATA' with linespoints便可用先将图中的点连接起来


(3)同时绘制函数和数据的命令

plot 'TEST.DATA' using 1: ($2+$3) title 'data' with lp , x**2   运行截图如下 截图中红线有缺少是因为TEST.DATA中有一行空格、


(4) 给出一个三维绘图的例子 有兴趣的可以自己试试

splot [-1:1] [-1:1] (x*x-y*y) / (x*x+y*y)     //splot 是plot的扩展是专门来画三维图像的命令 运行截图我就不给了 大家自己做做看吧 研究中还是二维用的比较多

3 NS-2有关的工具还有很多 我就不一一介绍了,例如cbrgen,setdest,threshold,nam,xgraph,Tracegraph等,有兴趣的同学查看徐雷鸣老师的《NS与网络模拟》,挺好的 我也是看着这本书一点一点做的

下面免费分享一个我个人觉的写的不错的ns-2 的文档,下面是csdn的下载页面

http://download.csdn.net/detail/shuoguo77/6323261


我用Spring5的aop应用时报这个错误Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [D:\ecliple\web5\WEB-INF\applicationContext.xml]; nested exception is java.nio.file.NoSuchFileException: WEB-INF\applicationContext.xml,他说我的applicationContext.xml文件不存在,可是我明明有这个文件,另外我的web.xml需要更改吗<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <context-param> <param-name>contextConfigLocation </param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <display-name>Struts2</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class> <!--2.5版本的写法 --> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate5.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/* </url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app>
最新发布
05-30
这个错误提示说找不到你的 applicationContext.xml 文件,可能是文件路径设置有误或者是文件名写错了。你需要检查一下 applicationContext.xml 文件是否存在于 WEB-INF 目录下,并且在 contextConfigLocation 配置中的路径是否正确。 同时,你的 web.xml 文件中的 contextConfigLocation 配置也需要修改一下,将参数值改为 /WEB-INF/applicationContext.xml (去掉后面的空格),这样才能正确加载 applicationContext.xml 文件。 修改后的 web.xml 文件应该如下所示: ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <display-name>Struts2</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts2</filter-name> <filter-class> <!--2.5版本的写法 --> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter </filter-class> </filter> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate5.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值