MathGroup Archive 2010

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

Search the Archive

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: WORKBENCH VS MATHEMATICA
  • Next by Date: How to construct symmetric matrix from just a one half matrix
  • Previous by thread: Re: Can you tell me what is wrong with this program
  • Next by thread: Re: DiscretePlot