我曾想过利用sumd和idx值。 function [Clustering, SYSTEM] = CLUST_Bkmeans(kk, SYSTEM, USERS, ChannelMatrix) Clustering = cell(SYSTEM.Nbeams,1); UserPool = (1:SYSTEM.Nusers)'; Channel_real = real(ChannelMatrix); Channel_imag = imag(ChannelMatrix); avg_clusterSize = kk; for ii=1:SYST...