Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Floor[] Not An Integer?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56520] Re: Floor[] Not An Integer?
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Thu, 28 Apr 2005 02:40:06 -0400 (EDT)
  • References: <d4msf0$233$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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?