我試圖找出一些數據的中位數,模式,平均值和範圍。使用編程很容易找到意思;但中位數,模式和範圍要求數字按順序排列(從最小到最大)。訂單號與Lua
此外,我試圖組裝它,因此它會返回我需要製作盒子和晶須圖的數據。 (並非全部,只是基本)。
現在我只是在做這個: 順序的編號爲表(函數將返回)
QWERTYUIOP [] \
好了,這裏的主要問題: 將如何我這樣做?
這是我上運行:
function Order_Numbers(Data_Set, Greatest_Integer, Least_Integer)
local Ordered = {} --Give a place for the numbers to go
for i=Least_Integer, Greatest_Integer do --Start from the lowest value, continue to highest.
table.insert(Ordered, Data_Set[i])
end
return Ordered
end
但它不工作! 任何人有想法?
這將是超級有用的, '>嘗試調用全局「分區」(一個零值)' – John