Hi Akbar,
The error message you are getting suggests that there is a type mismatch between the citra_Prepro and citra_Process variables. Specifically, it seems that one of the variables is an integer and the other is a double. To fix this, you can convert both variables to the same data type using the double function. Here's an updated version of the MSE_PSNR function:
function [nilaiMSE, nilaiPSNR] = MSE_PSNR(citra_Prepro,citra_Process)
%MSE
c_Prepro = double(citra_Prepro);
citra_Process = double(citra_Process);
[m, n] = size(citra_Process);
nilaiMSE = sum(sum((citra_Prepro - citra_Process).^2))/(m*n);
%PSNR
nilaiPSNR = 10*log10(255*255/(nilaiMSE));
end
This version of the function converts both input variables to doubles using the double function, which should resolve the type mismatch error.