Info
此问题已关闭。 请重新打开它进行编辑或回答。
could anyone help me to solve the issue in the following code.
1 次查看(过去 30 天)
显示 更早的评论
code:
clear all;
clc;
X=[ 9 10 11 ;
5 6 7 ;
4 3 2 ]
Y=[0.1 0 0.2 ;
0 0.3 0 ;
0 0.5 0 ]
A = partitions(3);
total_number_of_partitions = length(A);
for particle=1
idx = randperm(total_number_of_partitions,1) ;
particle = A(idx);
partdisp(particle);
for len_partition=1:length(particle)
for len_cluster=1:length(particle{len_partition})
display_user_inside_cluster=(particle{len_partition}{len_cluster})
for x =1:size(X,2)
for y =1:size(Y,1)
throughput(x,y) =1+((X(x,y)).*(Y(x,y)));
end
end
overall_throughput = sum(sum(throughput));
end
end
end
totalthroughput=sum(overall_throughput)
I run the above code and got the result as follows:
The formation of clusters {1 2 3}:
{1} {2} {3}
As there are three clusters i am getting three values of overall_throughput each one corresponds to one cluster using the command line
overall_throughput = sum(sum(throughput));
In next step I need to add all the three overall_throughput together.
So i used the command line
totalthroughput=sum(overall_throughput).
But it doesnot add all the three overall_throughput together.
Could anyone help me how to add all three overall_throughput together.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!