So my project is to analysis a graph. I want to find algorithm to find the max and min data. I got different value of max in each graph. So i wanna to find the average or the high frequency max value.
PLEASE LOOK AT THIS LINK PICTURE
I have been write to find maximum data. Here my code
Private Function FindMaxDataTableValue(ByRef dt As DataTable) As Integer
Dim currentValue As Integer, maxValue As Integer
Dim dv As DataView = dt.DefaultView
For c As Integer = 0 To dt.Columns.Count - 1
dv.Sort = dt.Columns(c).ColumnName + " DESC"
currentValue = CInt(dv(0).Item(c))
If currentValue > maxValue Then maxValue = currentValue
Next
Return maxValue
End Function