0
我是一名IDL初學者,我想知道是否可以在IDL中獲得一些幫助。我在Harris Geospatial上找到了一個很好的例子來解釋這個方法,但是我對如何在我自己的數據上運行集羣(ASCII)來執行K均值分析感到困惑。我如何使用而不是產生隨機數
下面是我對哈里斯發現代碼中的「隨機」功能我的數據:IDL中的K均值聚類
n = 50
c1 = RANDOMN(seed, 3, n)
c1[0:1,*] -= 3
c2 = RANDOMN(seed, 3, n)
c2[0,*] += 3
c2[1,*] -= 3
c3 = RANDOMN(seed, 3, n)
c3[1:2,*] += 3
array = [[c1], [c2], [c3]]
; Compute cluster weights, using three clusters:
weights = CLUST_WTS(array, N_CLUSTERS = 3)
; Compute the classification of each sample:
result = CLUSTER(array, weights, N_CLUSTERS = 3)
謝謝。