Plot bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg6363] [mg6363] [mg6354] Plot bug?
- From: bmiller at illigal.ge.uiuc.edu (Brad Miller)
- Date: Fri, 14 Mar 1997 14:53:43 -0500 (EST)
- Organization: University of Illinois at Urbana
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I am running the new version of mathematica (3.0), and some
code that worked under the old version (2.x?) is not working.
pseudo-mathematica session
*****************************************************
1> Needs["Statistics`ContinuousDistributions`"]
2> PopRatio[pratio_]:=
Module[{p}, p=CDF[NormalDistribution[0,1],pratio];
- 2 pratio / Ln[(1-p)/p]
]
3> Plot[PopRatio[x],{x,.000001,.7}]
Errors: "Plot::plnr : PopRatio[pratio] is not a machine-size real
number at pratio = 0.0283978535340494791"
and many other points also say not a machine-size real number
*****************************************************
Doing a PopRatio[0.0283978535340494791] on the reported bad number
produces the correct PopRatio return value - it does not blow up. So,
I'm surmising the problem is in the Plot cmd?
This exact fn worked in mathematica 2.x - result should be a plot from
around 1.26 to 1.2 - there are no discontinuities in the plot.
Any suggestions on how to get PopRatio to plot correctly?
thanks,
Brad
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Brad L. Miller %
% University of Illinois at Urbana-Champaign %
% ph: (217) 333-2346 email: bmiller at uiuc.edu %
% fax: (217) 244-5705 web: http://www-illigal.ge.uiuc.edu/~bmiller %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%