Consider the quantity $$H=n-1-\sum_{i\ne j} R_{ij}, $$where $R$ is a random $n\times n$ Hermitian matrix with trace $1$. The code that generates it was kindly provided by a user in another question of mine:
ClearAll[symmetrize, mR, h]
symmetrize = (1/2) (# + ConjugateTranspose @ #) &;
mR[n_Integer] := Module[{a = symmetrize@RandomComplex[1 + I, {n, n}]}, a/Tr[a]]
h[m_] := Length[m] - 1 - Total[MapIndexed[Drop]@m, 2]
My objective is to define the quantities $$\tau_1=\frac{\pi\hbar}{2H},\quad \tau_2=\frac{\pi\hbar}{2\Delta H} $$ where $\Delta H=H(n-H)$ and plot $\max(\tau_1,\tau_2)$ as a function of the dimension $n$.
This is my naive approach to the code:
delta[m_]=h[m]*(Lenght[m]-h[m])
tau1[m_]:=(Pi*\[HBar])/(2*h[m])
tau2[m_]:= (Pi*\[HBar])/(2*delta[m])
DiscretePlot[Max[tau1[m], tau2[m]], {Lenght[m], 0, 1000}]
I don't get any errors, but the plot turns out to be empty. Any tip on how to solve this is greatly appreciated!
r=mR@3
andh@r
. However, still no dice! $\endgroup$DiscretePlot
command,Length[m]
should bem
. $\endgroup$tau1[500]
to see that. $\endgroup$