Random Generation of Binary Orthogonal Matrix of Size n * n with Matlab
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hiba Basim Alwan
am 24 Feb. 2018
Kommentiert: Uri Cohen
am 25 Jul. 2019
Dear all...
How can I generate random binary orthogonal matrix of size n * n with matlab?
Regards,
0 Kommentare
Akzeptierte Antwort
Guillaume
am 24 Feb. 2018
Bearbeitet: James Tursa
am 22 Mär. 2018
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 Kommentare
Weitere Antworten (1)
javad ebrahimi
am 24 Feb. 2018
Hi Hiba Basim Alwan
this code can help you: for n=10
C = rand(10)
Y = round(C)
1 Kommentar
Guillaume
am 24 Feb. 2018
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.
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!