-1
所以我的项目是分析一个图。我想找到算法来查找最大和最小数据。我在每张图中得到了不同的max值。所以我想找到平均值或高频率最大值。如何查找数据的算法平均值(最大值和最小值)
PLEASE LOOK AT THIS LINK PICTURE
我已经写找到最大的数据。在这里我的代码
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
你可以是这样的:每个图形检查每个值。将第一个值存储在变量中,如果下一个值更高,则将其替换为低位。 [Check this](http://stackoverflow.com/questions/2442525/how-to-select-min-and-max-values-of-a-column-in-a-datatable) – Mederic
定义'高频最大值'在你的情况下请 –
@AlexB。如何使用高频最大值 –