Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

Test of a pure function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34010] Test of a pure function
  • From: "Shawn O'Connor" <soconnor at ccs.nrl.navy.mil>
  • Date: Fri, 26 Apr 2002 03:27:37 -0400 (EDT)
  • Organization: Naval Research Laboratory, Washington, DC
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

    I hope someone can help me with this I know the solution should be easy
but I am still learning how pure functions work.

I am trying to pick out a position in a list were a number falls i.e.

Position[xBins, _?(#1<=x <= #2 &)].  I keep getting errors Like these


Function::slotn: Slot number 2 in #1¾x¾#2& cannot be filled
from \
(#1¾x¾#2&)[List].

Function::slotn: Slot number 2 in
#1¾x¾#2& cannot be filled from \
(#1¾x¾#2&)[-1].

From
In[83]:=
Function::slotn: Slot number 2 in #1¾x¾#2& cannot be filled from
\
(#1¾x¾#2&)[-0.995].

General::stop: Further output of
Function::slotn will be suppressed during \
this calculation.


Can I make a comparison with the nth and nth+1 element in a pure function.
Thank you,





  • Prev by Date: Getting File Directory Using Any Platform
  • Next by Date: RE: passing functions as parameters
  • Previous by thread: Re: Getting File Directory Using Any Platform
  • Next by thread: Re: Test of a pure function