免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2869 | 回复: 3
打印 上一主题 下一主题

[桌面系统] [gnuplot] 为什么这个式子画出来的是直线? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-15 00:47 |只看该作者 |倒序浏览
plot \
-0.25*0.02*x/(1+x/400) title "theoretish" with lines linewidth 2, \
-1/4*0.02*x/(1+x/400) title "theoretish" with lines linewidth 2


:em11: 第一条是正确的,第二条沿x轴画了一条…………………………请问为什么?

Terminal的截图:

wu@UNIX ~/project/Bericht/current/EMTv4/Data/4.1.a.strom $ gnuplot

        G N U P L O T
        Version 4.2 patchlevel 4
        last modified Sep 2008
        System: Linux 2.6.28-gentoo-r1-wu-x64

        Copyright (C) 1986 - 1993, 1998, 2004, 2007, 2008
        Thomas Williams, Colin Kelley and many others

        Type `help` to access the on-line reference manual.
        The gnuplot FAQ is available from http://www.gnuplot.info/faq/

        Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>


Terminal type set to 'x11'
gnuplot> plot \
> -0.25*0.02*x/(1+x/400) title "theoretish" with lines linewidth 2, \
> -1/4*0.02*x/(1+x/400) title "theoretish" with lines linewidth 2
gnuplot>

论坛徽章:
0
2 [报告]
发表于 2009-03-15 07:49 |只看该作者
貌似是浮点的问题,
plot -1.0*1/4*0.02*x/(1+x/400) title "theoretish" with lines linewidth 2
就正常的

那个式子里有浮点数0.02,为何不按浮点数运算…………

论坛徽章:
0
3 [报告]
发表于 2009-03-21 17:45 |只看该作者
我是路过的,支持下再走,都挺不容易的..

论坛徽章:
0
4 [报告]
发表于 2009-03-23 00:10 |只看该作者
难道需要强制转换?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP