Hello I have an Array of value sorted in ascending order. My plan is to find the maximum of the array, and the position of the maximum value and cut the array from the beginning to the max position.This should be done in a for loop and the end I would like to have an array with all maximum values and the associated positions. As the Array.findMaxima function will find the first position at maximum value (so if I have 275,276,276.. it will give me position number 1), I have created another array r3 without repeated value to understand how many iterations I need. This is what I have done so far. Of course it doesn't work, there is something wrong in the for loop. Please, can you help me?
b=0; // to have an array without repeated value
Array.getStatistics(rr2, min, max, mean, stdDev);