Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: What is the function doing

  • To: mathgroup at
  • Subject: [mg39893] Re: What is the function doing
  • From: atelesforos at (Orestis Vantzos)
  • Date: Sun, 9 Mar 2003 18:40:35 -0500 (EST)
  • References: <b4f6im$7h3$>
  • Sender: owner-wri-mathgroup at

It should probably be Flatten[coord,1] since Flatten[coord,2] will
eliminate all internal brackets leaving just a long list of numbers.
Anyway, assuming that it is Flatten[coord,1] which creates a simple
list of vectors, Select[Flatten[coord,1],OddQ[Plus@@#]&] will return
those vectors in coord ,whose sum of coordinates is an odd number.

In the example you gave that would be,

densmore.3 at (Jdensmor) wrote in message news:<b4f6im$7h3$1 at>...
> Hi,
>     Can someone help me decipher how this function is working and what
> it is doing
> Select[Flatten[coord,2], OddQ[Plus @@ #] & ];
> coord= {{{0,0,0},{1,0,0},{1,1,0}...etc
> coord is a list of 3d position. I've looked up what each fucntion
> does, but I can't seem to put it all together for it to work. Thanks

  • Prev by Date: Re: Conclusion: Mathematica will output plain text
  • Next by Date: Running ssh in Mathematica
  • Previous by thread: What is the function doing
  • Next by thread: Re: What is the function doing