Timeline for Removing all values from a list that satisfy a given condition
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 7, 2014 at 5:57 | vote | accept | user170231 | ||
Nov 6, 2014 at 13:01 | answer | added | Basheer Algohi | timeline score: 4 | |
Nov 6, 2014 at 9:51 | answer | added | Mr.Wizard | timeline score: 4 | |
Nov 6, 2014 at 8:51 | history | edited | Kuba |
edited tags
|
|
Nov 6, 2014 at 6:36 | answer | added | ubpdqn | timeline score: 3 | |
Nov 6, 2014 at 4:52 | answer | added | Dr. belisarius | timeline score: 14 | |
Nov 6, 2014 at 4:08 | comment | added | Nasser |
If your list has {{a},{b}....} and not {a,b,c}, then use DeleteCases[rad, x_ /; (First@x > 10 && First@x < 700)] You need First@ to be do x[[1]] basically, since each x is a list now. (you can write x[[1]] if you prefer.
|
|
Nov 6, 2014 at 3:58 | comment | added | Nasser |
In your new code, replace it with this: DeleteCases[rad, x_ /; (x > 10 && x < 700)] then it will work. I get {6.94622, 799.3}
|
|
Nov 6, 2014 at 3:55 | history | edited | user170231 | CC BY-SA 3.0 |
more stuff
|
Nov 6, 2014 at 3:49 | comment | added | Mr.Wizard | Please include minimal code for your "circles" example. | |
Nov 6, 2014 at 3:38 | comment | added | user170231 |
Nice, that works perfectly for the really simple example I posted. How can I modify it for the circle example? And yeah, I had defined list as I did because /. 4->Sequence[] didn't work properly.
|
|
Nov 6, 2014 at 3:33 | comment | added | Nasser |
DeleteCases[list, x_ /; First@x > 3] If you had made your table like this: Table[n, {n, 1, 5}] it would be easier a little: DeleteCases[list, x_ /; x > 3]
|
|
Nov 6, 2014 at 3:30 | history | asked | user170231 | CC BY-SA 3.0 |