Is there a way to use If statements with Table? To give a kind of ridiculous example that captures to spirit of what I'm trying to do, and I'm aware there are much better ways to do this, let's say we want to make an array of even values from zero to ten:
Table[If[Mod[k,2]==0,k],{k,0,10}]
The output is:
{0, Null, 2, Null, 4, Null, 6, Null, 8, Null, 10}
We could then delete the NULL entries and have our list of even values from zero to ten. However, how is this actually properly so that we don't have any NULL statements in the output from Table?