1
$\begingroup$

From Derbyshire's Prime Obsession, I would like to get the Mathematica code to generate a Hermitian matrix for evaluation and display. $ 256 \times 256 $ would be nice. Random Normal distribution, eigenvalues, etc. All or part code. Any references? I am but a humble novice. New to StackExchange. Thanks.

$\endgroup$
2
  • 2
    $\begingroup$ Were you referring to this? BTW, the current version now has GaussianUnitaryMatrixDistribution[]. $\endgroup$ Nov 21, 2015 at 0:22
  • $\begingroup$ Thanks: I have Mathematica 10.3 including GaussianUnitaryMatrixDistribution[]. Didn't know I had it, but I do. $\endgroup$
    – Don
    Dec 5, 2015 at 0:35

1 Answer 1

4
$\begingroup$

If I had interpreted you correctly, here's my attempt to do the figures here:

n = 269; k = 10;
mat = RandomVariate[GaussianUnitaryMatrixDistribution[n]];
eig = Sort[Eigenvalues[mat], LessEqual];
{p, q} = MinMax[eig]; h = (q - p)/k;
bins = BinLists[eig, {p, q, h}];

zer = Im[N[ZetaZero[Range[n]]]];
{zp, zq} = MinMax[zer]; zh = (zq - zp)/k;
zbins = BinLists[zer, {zp, zq, zh}];

{Graphics[Point[Flatten[MapIndexed[{#1 - h (#2[[1]] - 1), #2[[1]]} &, bins, {2}], 1]],
          AspectRatio -> 1], 
 Graphics[Point[Flatten[MapIndexed[{#1 - zh (#2[[1]] - 1), #2[[1]]} &, zbins, {2}], 1]],
          AspectRatio -> 1]} // GraphicsRow

they do look similar, don't they?

$\endgroup$
2
  • $\begingroup$ JM Thanks. The code is a big help. Don $\endgroup$
    – Don
    Nov 23, 2015 at 2:54
  • $\begingroup$ JM On further review the code in your answer was tight and elegant. $\endgroup$
    – Don
    Dec 5, 2015 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.