Say we have an array named
How can I find the index of the maximum element of this array?
For example the MATLAB code would be:
myMeasurements = [3,4,8,12,7,2,1,67,8]; [maxValue,Index] = max(myMeasurements);
maxValue is returned as 67 whereas the
Index is returned as 8.
For the record, I am using Teensy 3.2 and I program it with the Arduino IDE using the Teensyduino add-on.