octave = zeros(1, 8);
third = zeros(1, 8);
fifth = zeros(1, 8);

for i = 2:8
    octave(i) = RMSE(4, 2, 8, i);
    third(i) = RMSE(4, 2, 5, i);
    fifth(i) = RMSE(4, 2, 3, i);
end

plot (2:8, octave(2:8), 'r', 2:8, third(2:8), 'b', 2:8, fifth(2:8), 'g');