フィルターのクリア

Random Generation of Binary Orthogonal Matrix of Size n * n with Matlab

3 ビュー (過去 30 日間)
Hiba Basim Alwan
Hiba Basim Alwan 2018 年 2 月 24 日
コメント済み: Uri Cohen 2019 年 7 月 25 日
Dear all...
How can I generate random binary orthogonal matrix of size n * n with matlab?
Regards,

採用された回答

Guillaume
Guillaume 2018 年 2 月 24 日
編集済み: James Tursa 2018 年 3 月 22 日
I'm not a mathematician so I could be completely wrong but aren't square binary orthogonal matrices just permutations of the rows (or columns) of the identity matrix?
If yes,
m = eye(n);
m = m(randperm(n), :)
This certainly generates random binary orthogonal matrices of size nxn. Whether it can generate all the possible ones, I don't know.
  2 件のコメント
Hiba Basim Alwan
Hiba Basim Alwan 2018 年 3 月 22 日
Thank you so much for your helping.
Uri Cohen
Uri Cohen 2019 年 7 月 25 日
No, they are not.

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

その他の回答 (1 件)

javad ebrahimi
javad ebrahimi 2018 年 2 月 24 日
Hi Hiba Basim Alwan
this code can help you: for n=10
C = rand(10)
Y = round(C)
  1 件のコメント
Guillaume
Guillaume 2018 年 2 月 24 日
That does produce a matrix that is binary and random, but certainly not orthogonal (which is the difficult bit of the question).
randi([0 1], n)
is a simpler way of producing a binary matrix.

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by