Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
jaah navi
jaah navi el 29 de Abr. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by