error: size of array 'momentumOfparticles' has non-integral type 'float [i]'

Thanks,

  for (int i = 0; i < 10; i++)
  {
    float VelocityOfparticles[i] = random(0, 10);
    randomPick =  randomNub[random(0, 10)];
  }

So you seem to create 10 times a new variable with a size of 0 .. 10 ?

The first line inside the block does not refer to the variable that you declared in the beginning of your code; is that the intention?

Time to read up on arrays, I think.

Note:
this is not necessarily related to the error that you get; but I suspect that it relates to the same type of problem.