how to store all values in one matrix in my code ?
1 回表示 (過去 30 日間)
古いコメントを表示
here start's my code see below and run my code after running my code you will get like this
r =
0
All cluster head:
X Y E D
20.8804 50.6459 0.9994 93.2509
66.3680 104.8504 0.9997 33.9800
80.0382 156.6456 0.9996 60.0599
84.6183 125.4252 0.9997 29.7159
84.7459 92.5260 0.9998 16.9867
121.3182 55.9365 0.9997 48.9496
135.9162 22.4920 0.9995 85.4252
147.9776 50.8509 0.9996 68.6840
178.1875 56.5368 0.9994 89.4558
183.0381 54.4672 0.9994 94.7025
189.6740 177.5828 0.9988 118.5770
199.6349 138.7574 0.9991 106.9076
up to r=5, and now i want to access all the values in one matrix like this
AllCH111(1).x1=[135.9162 22.4920 0.9995 85.4252
147.9776 50.8509 0.9996 68.6840
178.1875 56.5368 0.9994 89.4558
183.0381 54.4672 0.9994 94.7025
189.6740 177.5828 0.9988 118.5770
199.6349 138.7574 0.9991 106.9076];
AllCH111(2).x1=[135.9162 22.4920 0.9995 85.4252
147.9776 50.8509 0.9996 68.6840
178.1875 56.5368 0.9994 89.4558
183.0381 54.4672 0.9994 94.7025
189.6740 177.5828 0.9988 118.5770
199.6349 138.7574 0.9991 106.9076];
AllCH111(3).x1=[135.9162 22.4920 0.9995 85.4252
147.9776 50.8509 0.9996 68.6840
178.1875 56.5368 0.9994 89.4558
183.0381 54.4672 0.9994 94.7025
189.6740 177.5828 0.9988 118.5770
199.6349 138.7574 0.9991 106.9076];
like this want to get..and i have tried in my code it's self see last 'for loop'
0 件のコメント
採用された回答
Azzi Abdelmalek
2014 年 12 月 4 日
The last for loop of your code is:
for r=1:rmax
AllCH111(r).x1=AllCH1(:,1);
AllCH112(r).y1=AllCH1(:,2);
CHbest1(r).x1=CHbest(:,1);
CHbest2(r).y1=CHbest(:,2);
end
In this loop AllCH1(:,1) is not varying, you need to put this inside the loop where ALLCH1 is varying
7 件のコメント
Roja G
2020 年 11 月 3 日
Greetings of the day..!
sir i want to know how to connect basestation and cluster head,i want to know the link between ch and bs code.
sir could you please help me.
Thanx in advance.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Clusters and Clouds についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!