WOLFRAM NOTEBOOK

In[]:=
CompoundExpression[
]
deploy
Wed 19 Apr 2023 21:57:13
In[]:=
Clear["Global`*"];d=50;numSteps=30;discretize[expr_]:=N@Table[expr/.{ii0},{i0,0,d-1}];ones=discretize[1];ii=DiagonalMatrix[ones];steps=Range[0,numSteps];ann[vals_]:={steps,vals};p=0.5//N;e0=1;h=
-p
(i+1)
/z;{e0$,h$}=discretize/@{e0,h};h$=h$/Total[h$];A=2DiagonalMatrix[h$]-{h$}.{h$};eigs=Eigenvalues[A];ListLogLogPlot[{eigs,Diagonal[A],2h$},Joined{True,False,False},PlotLegends{"2h","eigenvalues"}]
Out[]=
2h
eigenvalues
In[]:=
Max@Abs[eigs-Diagonal[A]]
Out[]=
0.0051149
In[]:=
Max@Abs[eigs-(2h$)]
Out[]=
0.00523789
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.