clear %clears memory clc %clears screen stop = 10^(-15); %Stop criterion. x_k = [0;0]; %First element of the cauchy sequence. x_kp = [10; 10]; %Second element of the cauchy sequence. i = 1; %Dummy variable used only as a primer while( max( abs( x_k - x_kp ) ) > stop) %While the sup[x_k, x_kp] is greater than stop... if(i == 1) %If this is the first iteration... i = i + 1; %Save that it is no longer the first iteration. else %(If it is not the first iteration...) x_k = x_kp; %Replace the previous value by the actual value end x_kp = toperator( x_k ); %Apply the contraction. end %The program will stop when the sequence as converged (up to 10^(-15)).