Array comparison

This method returns the index of the lowest element of your array:

int indexLowest(float[] array) {
  int ind=0;
  float min=999999;
  for (int i=0; i<array.length; i++) if (array[i]<min) {
    ind=i;
    min=array[i];
  }
  return ind;
}

A method for the max would work simular.