From your description, I assume your f
table looks something like this:
{1, 1, -1, 1, -1, -1, 1, -1}
If I use DeleteElements[]
on it as follows, I get the desired result:
DeleteElements[{1, 1, -1, 1, -1, -1, 1, -1}, {-1}]
(* {1, 1, 1, 1} *)
It looks like your DeleteElements[]
code does not end in {-1}]
. Rather, you seem to have put the {-1}]
in the middle of the Table[]
code. This is probably the problem, unless there is a problem with f
or e
, which you did not show.