% sample.m
%  This is just a sample script I made with MATLAB's editor.
%
z = input ( 'Enter a value X:' );

x1 = z
y1 = z / x1

x2 = ( x1 + y1 ) / 2
y2 = z / x2

x3 = ( x2 + y2 ) / 2
y3 = z / x3