필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
jaah navi
jaah navi 2019년 4월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
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.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by