Getting error in PSNR calculation using Matlab
Why this is happening?

The answer is quite simple and the error message exactly tells you what is wrong: Apparently you do not have the function psnr() available on your system.

This might have many reasons. Most probably:


You are missing a Matlab toolbox that provides this function
You are missing a Matlab script that provides this function


If you have the script, then Matlab does not know about it. Check your Matlab path settings