Mathematica conundrum
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1782] Mathematica conundrum
- From: Zorro <berriz at husc.harvard.edu>
- Date: Sun, 30 Jul 1995 21:35:46 -0400
- Organization: Harvard University, Cambridge, Massachusetts
Hi. When I issue the command Plot[Exp[-5x],{x, 0, 5}, PlotRange->{0,1}]; Mathematica produces the plot without a hitch. Similarly, when I issue Plot[Exp[-x],{x, 0, 5}]; Likewise, the command Plot[Evaluate[Table[Sin[n x],{n, 5}]], {x, 0, 1}, PlotRange->{-1, 1}]; produces, as expected, a series of superimposed sine waves. BUT, Mathematica balks at Plot[Evaluate[Table[Exp[-nx],{n, 5}]], {x, 0, 5}, PlotRange->{0, 1}]; spitting out Plot::plnr: CompiledFunction[{x}, <<1>>, -C<<11>>-][x] is not a machine-size real number at x = 0.. Plot::plnr: CompiledFunction[{x}, <<1>>, -C<<11>>-][x] is not a machine-size real number at x = 0.208333. Plot::plnr: CompiledFunction[{x}, <<1>>, -C<<11>>-][x] is not a machine-size real number at x = 0.416667. General::stop: Further output of Plot::plnr will be suppressed during this calculation. ... and an empty plot (two axes, no graphs). Why is this? What could the error messages mean?? After all, Exp[-nx] is well-behaved everywhere, and reasonably valued in the requested ranges of x and n. ( I have no problems when I try to produce the plots individually (for each value of n), nor when I use Show to combine them in a single plot...) And the meta-follow up: is there a reference I could have looked up (besides possibly reading Wolfram's book cover-to-cover) to find the answer to this question? Thanks for your help. Z.