               
      
  %                 Script file fixed2.m  
  %    User must provide inline functions or mfiles for functions
  %    f(x,y) and g(x,y). The script computes the functional iterations
  %    and plots them in the rectangle with corners [a b c d].
       close
      
       corners = input( 'enter the corners [a b c d]  ')
       p = input('enter the starting point p0 =[x0,y0]  ')
       N = input('enter the number of iterations  ')
       figure
       axis(corners)
       hold on
       format compact; format long;
       disp('  ')
       disp('            x                y             f(x,y)          g(x,y)')
       [p(1), p(2), f(p(1),p(2)), g(p(1), p(2))]
       plot(p(1), p(2), '*')
       disp('hit return to continue  ')
       pause
       format long
       for n = 1:N
            p = [f(p(1),p(2)), g(p(1),p(2))];
            n
            [p(1),p(2), f(p(1),p(2)), g(p(1),p(2))]
            plot(p(1), p(2), '*')
            disp('hit return to continue ')
            pause
       end
       x = p(1); y = p(2);

       hold off
       format loose
       format short



