MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: DiscretePlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110372] Re: DiscretePlot
  • From: "Ingolf Dahl" <ingolf.dahl at telia.com>
  • Date: Wed, 16 Jun 2010 05:35:50 -0400 (EDT)

I was about to answer in the following way, as I have done before:

"Is there any serious Mathematica user in this forum, which has not stumbled
on this problem one or several times, when DiscretePlot, or some other
function, tries to evaluate a numeric function symbolically first, before
inserting the numbers? Sometimes it would be nice to have an option,
SymbolicEvaluation->False, which could be set for DiscretePlot in these
cases.
It is not always so convenient to have to define an extra function just to
take care of this. I think there is a whole group of commands acting
similarly to DiscretePlot."

But then I tested with all the suggested commands in Mathematica 7.0.1.0
(Windows 7, 64 bit), and I did not obtain any error messages at all.

Ingolf Dahl
Sweden


> -----Original Message-----
> From: Andrzej Kozlowski [mailto:akoz at mimuw.edu.pl]
> Sent: den 15 juni 2010 08:27
> To: mathgroup at smc.vnet.net
> Subject: [mg110348] DiscretePlot
> 
> I am somewhat puzzled by the following behaviour of DiscretePlot
> 
> fff = Compile[{x}, x^2];
> 
> This works fine:
> 
> DiscretePlot[fff[x], {x, 1, 10, 0.1}, Joined -> True]
> 
> This also works, but produces an error message:
> 
> DiscretePlot[{fff[x]},{x,1,10,0.1},Joined->True]
> CompiledFunction::cfsa: Argument x at position 1 should be a machine-
> size real number. >>
> 
> This becomes a (slight) problem when plotting several functions. Using
> ListLinePlot avoids it:
> 
> ListLinePlot[{Table[fff[x], {x, 1, 10, 0.1}]}, Joined -> True,
>  Filling -> Bottom]
> 
> Andrzej Kozlowski=



  • Prev by Date: Re: Divergent integration result
  • Next by Date: Re: How to construct symmetric matrix from just a one half matrix
  • Previous by thread: Re: DiscretePlot
  • Next by thread: Re: DiscretePlot