function RMSE = signalcompare4(b,decision)

[x,Fs] = audioread('DoReMi.wav');
x=x(:,2)';

if decision == 1
    out = simpleScaledCodec(x,Fs,b);
else
    out = simplecodec(x,Fs,b);
end


trunc_x=x(33:end-32)';
if length(trunc_x)==length(out)
    disp('Truncated x is same length as compressed signal')
end

trunc_x=0.3*trunc_x/(max(abs(trunc_x)));

for i=1:length(out)
    err(i)=trunc_x(i)-out(i);
end
RMSE = norm(err,2)/sqrt(length(err))


end