Dear Michael,
I'm trying to use your code on images (using reshape to give them a vector structure) and I'm getting the following error message:
Error using ==> loggausspdf at 10
ERROR: sigma is not SPD.
Interestingly, after calling the command many times, the function eventually works.
Any feedback on this issue will be greatly appreciated!