MathGroup Archive 2005

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

Search the Archive

Re: Floor[] Not An Integer?


Scott Guthery wrote:
> I'm trying to use some of the NumericalMath approximations such as
> MiniMaxApproximation and RationalInterpolation with a function that
> includes array references of the form Array[[Floor[x]]].  The function
> plots and evaluates just fine but the NumericalMath functions are
> reporting the error:
> 
> "Part::pspec: Part specification Floor[x] is neither an integer nor a
> list of integers."
> 
> whereas the documentation states that Floor[x] IS an integer.
> 
> What am I missing?
> 
> Thanks for any insight.
> 
> Cheers, Scott
> 
Mathematica is complaining that at that point x did not have a value, so 
Floor[x] remained unevaluated rather than presenting an integer to the 
Part operation.

BTW, 'Array' is a built-in function - don't use it as a variable!

Presumably you expected x to have a value at this point, so perhaps you 
should post a little more code - unless you have figured out the problem 
by now.

David Bailey
dbaileyconsultancy.co.uk


  • Prev by Date: can Mathematica be useful for this?
  • Next by Date: Re: NIntegrate and NDSolve
  • Previous by thread: Re: Floor[] Not An Integer?
  • Next by thread: Re: Floor[] Not An Integer?