title: Fixed Point Iteration
body: <p>I am new to Matlab and I have to use fixed point iteration to find the <code>x</code> value for the intersection between <code>y = x</code> and <code>y = sqrt(10/x+4)</code>, which after graphing it, looks to be around 1.4. I'm using an initial guess of <code>x1 = 0</code>. This is my current Matlab code:</p>
  
  <pre><code>f = @(x)sqrt(10./(x+4));
  x1 = 0; 
  xArray(10) = [];
  for i = 1:10
      x2 = f(x1);
      xArray(i) = x2;
      x1 = x1 + 1;
  end
  plot(xArray);
  fprintf('%15.8e\n',xArray);
  </code></pre>
  
  <p>Now when I run this it seems like my <code>x</code> is approaching 0.8. Can anyone tell me what I am doing wrong?</p>