Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

could anyone help me how to avoid repetition of the same number of clusters

1 Ansicht (letzte 30 Tage)
jaah navi
jaah navi am 29 Apr. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I am having totally 4 users in my system with respect to the following code:
meas=[1 2;
3 4;
5 6;
7 8]
particles = 2;
iterations =2;
for t=1:iterations
for p=1:particles
cluster=size(meas,1)
clusters= randi(cluster,1,1)
D=partitions(cluster,clusters)
total_number_of_partitions = length(D)
idx=1
B = D(idx)
partdisp(B)
end
end
When i run the code it executes and gives the number and formation of clusters for each particle on every iteration.
But sometimes it display the same set of clusters on different iteration.
As i have used idx=1 i think it displays the same set of clusters.could anyone please help me how to modify it such that the set of clusters needs to be changed on each and every iteration with respect to each particle.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by