我需要选择W_tot_migl
矩阵的随机行。现在我正在这样做:
[m, n] = size(W_tot_migl); % m data points, n dimensions
randomPoints = [];
for i=1:14250
index = random('unid', m); % Pick the index at random.
randomPoints(i,:) = W_tot_migl(index,:); % Add random point.
W_tot_migl(index,:) = []; % Delete selected row.
m = m-1;
end
有没有更快的方法,也许可以避免循环?