0
$\begingroup$

I have a diagonalization problem. I have the eigenstates correctly, and I want to do a Gaussian-smearing (Weierstrass-transform) on them. So I have the wave functions ($\Psi$), and the continuous equation:

$$\zeta(x)=\int \mathrm{d} x' g_{\sigma_x}\left(x-x'\right)\left|\Psi(x')\right|^2,$$

where $g_{\sigma_x}$ is a normal distribution.

I do not know, how to do this with discrete vectors in MATLAB, i.e., $|\Psi|^2, \zeta \in \mathbb{C}^n$.

$\endgroup$
2
$\begingroup$

What you want is the convolution between two functions $f = |\Psi|^2$ and $g = g_{\sigma_x}(x)$, $h = (f * g)(x)$.

You can compute the Fourier transform of $h$, to get

$$\mathcal{F}\{h\} = \mathcal{F}\lbrace f\rbrace \mathcal{F}\lbrace g\rbrace\, ,$$

and then, just compute the inverse Fourier transform to obtain what you want

$$ h = \mathcal{F}^{-1}\lbrace\mathcal{F}\lbrace f \rbrace \mathcal{F}\lbrace g\rbrace\rbrace\, .$$

To do that in MATLAB, you need to sample your functions over your domain and use the Fast Fourier Transform instead. Maybe, MATLAB already has something like fftconvolve.

$\endgroup$
  • $\begingroup$ Thanks, I think this has to work. Now I have problem only with normalization. $\sum_n \zeta(n)$ has to be one. $\endgroup$ – Zsombor Jun 2 at 19:22
  • $\begingroup$ @Zsombor, you can divide by the norm of it. $\endgroup$ – nicoguaro Jun 2 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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