I am trying to plot the Kac Formula with MatLab and I am having trouble.
Here's a link to the formula
Kac Formula -- from Wolfram MathWorld
Any help would be greatly appreciated.
I am trying to plot the Kac Formula with MatLab and I am having trouble.
Here's a link to the formula
Kac Formula -- from Wolfram MathWorld
Any help would be greatly appreciated.
First you write a function to evaluate $\displaystyle I_n(t)$, Now we want:
$\displaystyle E_n=\frac{1}{\pi}\int_{-\infty}^{\infty}I_n(t)\; dt$
In order to get rid of the infinite range of integration we make a change of variable: $\displaystyle u=\arctan(t)$ and the integral becomes:
$\displaystyle E_n=\frac{1}{\pi}\int_{-\pi/2}^{\pi/2}\frac{I_n(\tan(u))}{\cos^2(u)}\; du$
Now you use Matlab quad function to evaluate this.
CB