I'm trying to calculate the MSE of some audio files in MATLAB. My code is shown below.
[y1,fs1]=audioread('one.mp3');
[y2,fs2]=audioread('two.mp3');
[c1x,c1y]=size(y1);
[c2x,c2y]=size(y1);
R=c1x;
C=c1y;
err = sum((y1-y2).^2)/(R*C);
MSE=sqrt(err);
The problem is, when the MSE is calculated, I get a 1 x 2 matrix, when instead I need a single value.
What am I doing wrong?