0
我想了解我的项目中音频文件的MSE和PSNR的值。到目前为止,我写的代码如下:matlab中音频信号的PSNR
[y1,fs1, nbits1,opts1]=wavread('one.wav');
[y2,fs2, nbits2,opts2]=wavread('newOne.wav');
[c1x,c1y]=size(y1);
[c2x,c2y]=size(y1);
if c1x ~= c2x
disp('dimeonsions do not agree');
else
R=c1x;
C=c1y;
err = (((y1-y2).^2)/(R*C));
MSE=sqrt(err);
MAXVAL=65535;
PSNR = 20*log10(MAXVAL/MSE);
disp(['mse=' num2str(MSE) ' PSNR=' num2str(PSNR)]);
end
,但我如下收到错误:
矩阵的尺寸被连接起来并不一致。
我在做什么错?
它的工作奇妙。非常感谢。 –