function [] = final(rounds,n1,n2) build_example; M = Guess; s = size(M); rows = s(1) ; cols = s(2); norm_U = zeros(1,rounds); norm_V = zeros(1,rounds); for i= 1:rounds M = V_cycle(M,n1,n2); U_new = extract_n_interpolate_U(M); V_new = extract_n_interpolate_V(M); R_U = U-U_new; R_V = V-V_new; norm_U(1,i) = norm(R_U(3:rows-1,3:cols-2)); norm_V(1,i) = norm(R_V(3:rows-2,3:cols-2)); end subplot(2,2,1) ; mesh(X,Y,U); title(U_name); subplot(2,2,2) ; mesh(X,Y,U_new); title(['new-U : norm - ', num2str(norm_U)]); subplot(2,2,3) ; mesh(X,Y,V); title(V_name); subplot(2,2,4) ; mesh(X,Y,V_new); title(['new-V : norm - ', num2str(norm_V)]); % subplot(2,3,1) ; mesh(X,Y,U); title(U_name); % subplot(2,3,2) ; mesh(X,Y,U_new); title('new-U'); % subplot(2,3,3) ; mesh(X,Y,R_U); % subplot(2,3,4) ; mesh(X,Y,V); title(V_name); % subplot(2,3,5) ; mesh(X,Y,V_new); title('new-V'); % subplot(2,3,6) ; mesh(X,Y,R_V);