フィルターのクリア

how to deploy sensor nodes randomly in a matrix 100x100

1 回表示 (過去 30 日間)
Debalina Pal
Debalina Pal 2018 年 3 月 27 日
コメント済み: Walter Roberson 2018 年 5 月 18 日
how to deploy sensor nodes randomly in a matrix 100x100 ?

採用された回答

Jan
Jan 2018 年 3 月 27 日
M = zeros(100, 100);
Index = randperm(100*100, 100); % Linear index
M(Index) = 1;
Now you have 100 ones in a zero matrix. If "deploy nodes in a matrix" means something else, please be so kind and explain the details.
  52 件のコメント
Jan
Jan 2018 年 5 月 18 日
Please stop this discussion here. The original question to distribute elements in a matrix has been solved already. Attaching 47 further comments about a different topic is not useful. Debalina Pal, please open a new thread.
Walter Roberson
Walter Roberson 2018 年 5 月 18 日
I do not have code for that purpose. I would have to find code for it, which is something that you can do on your own.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by