I have a table that outputs 1 of 2 values, 1 or -1 I’m trying to figure out how to delete all of the instances of -1 from the table but none of the delete options that I’ve tried work. My table is set up like this:
f = Table[e, {x, (n*3) + 1, (z*3) + (n/z), -2}];
e can only equal 1 or -1 so I thought the following line would work but it outputs nothing
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.
Thanks for all of your suggestions I figured out what I was doing wrong, f is the quotient of two complex numbers I was only looking at the real portion and ignoring the unreal part, so in most cases I wasn’t getting -1 or even +1.
Finally figured it out, all I had to do was use the Round function on both components of f and it works perfectly. Have to admit I did it more out of desperation than anything i wasn’t expecting that to work