% Program: Fixed Point Method
% The program computes the approximate solution of x=g(x)
% Input g, x0, niter
% Output   x
function [x] = fixed_point(g,x0,niter)
x(1) = x0;
for i = 1: niter
	x(i+1) = g(x(i))
end
x = x(i+1);
end
