xrwma = [{'kx-'}, {'bo-'}, {'m*:'}, {'rv--'}]; X = [50 100 200 400 800]; Y = erwthma31(10); pvin = 50:10:800 figure hold on for N = 2:5 pfout = polyfit(X, Y, N); pvout = polyval(pfout, pvin); plot(pvin, pvout, char(xrwma(N-1))); legend('N = 2', 'N = 3', 'N = 3', 'N = 4', 'Location', 'NorthWest', 'boxoff'); xlabel('matrix size'); ylabel('mean time'); title('GER'); hold off end