function [ x ] = Algorun( A, x0, n ) % Runs an iterative algorithm x = zeros(n+1,1); x(1) = x0; for i = 1:n x(i+1) = A(x(i)); end end