err = zeros(1, 8);
errw = zeros(1, 8);

[y, Fs] = audioread('pa.mp3');

for i = 2:8
    err(i) = RMSEaudio(4, 2, i);
    errw(i) = RMSEaudio(4, 1, i);
end

plot (2:8, err(2:8), 'r', 2:8, errw(2:8), 'b');