public int getIndexOfMaxValue ( int channel ) { double [ ] values = getData ( ) [ channel ] ; int index = 0 ; double val = values [ index ] ; for ( int i = 1 ; i < numValues ( ) ; i ++ ) { if ( values [ i ] > val ) { index = i ; val = values [ index ] ; } } return index ; }
Returns the index of the maximum value of the specified channel .