The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: select a range of elements from a nested list
Replies: 1   Last Post: Dec 6, 1996 11:30 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Oliver Schurr

Posts: 5
Registered: 12/7/04
select a range of elements from a nested list
Posted: Dec 2, 1996 10:27 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi MathGroup

Say you have a nested list like that {{x1,y1},{x2,y2},{x3,y3},...{xn,yn}}
basically containing X and Y values for a XY plot in each element. The X
values span a range from say 0 to 0.4 and you ONLY want to select the
elements (x,y values) from the list for which the x value spans say 0 to
0.3. BUT you don't want to COUNT the elements (visually on the screen) and
figure out the position at which the x value is just greater than 0.3 and
then subtract 1 from this position.

I still want do define the list by using

Table[list[[x,1]],list[[x,2]],{x, 1, ZZZ}]

here ZZZ means the number for which the x value <= 0.3, this number needs
to be found by MATHEMATICA!

I like to know if there is a general procedure to select elements from a
nested list based on the values of one member of the elements of that
nested list.

I hope I made myself clear enough to you all.

Thanks a lot.

Oliver Schurr
Department of Chemistry
Georgetown University
Washington, DC 20057

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.