| New Reply |
problem with lists |
Share Thread |
| Aug9-12, 06:49 AM | #1 |
|
|
problem with lists
hi
I have a list which I want to drop some of it's rows and I have the id of the rows I want to drop in a list and there's no algorythem in the list how can I do that? I know the Command Drop[MC, {id}] whould drop the row number id but if I put this in a loop and try to drop them one by one the id's whould change since i'm dropping some rows and I tried to figure a way out of it but the just didn't work, any help? the first one in my list and the second one the id of the rows to be dropped PHP Code:
PHP Code:
|
| Aug9-12, 07:59 PM | #2 |
|
|
First drop row 40 and then drop row 38 and then drop row 36 ... and then drop row 2. The number of rows remaining in your list would decrease with each iteration, but by doing this in reverse order of the id's that you still need to delete would not change. |
| New Reply |
Similar discussions for: problem with lists
|
||||
| Thread | Forum | Replies | ||
| If I have a list that contains 16 sublist (enclosed in 2 curly | Math & Science Software | 4 | ||
| Problem with iterator for vector of lists in c++ | Programming & Comp Sci | 2 | ||
| Simple problem in Mathematica involving lists | Math & Science Software | 3 | ||
| linked lists | Introductory Physics Homework | 1 | ||