Skip to content

Commit b51feab

Browse files
committed
Generates matrices of Haar measure for beta=1,2
1 parent bd55af6 commit b51feab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/HaarMeasure.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# Computes samplex of real or complex Haar matrices of size nxn
3+
function HaarMatrix(n::Integer, beta::Integer)
4+
if beta==1
5+
M=randn(n,n)
6+
elseif beta==2
7+
M=randn(n,n)+im*randn(n,n)
8+
else
9+
error(string("beta = ",beta, " not implemented."))
10+
end
11+
qr(M)[1]
12+
end
13+
14+
15+

0 commit comments

Comments
 (0)