title: Newton Raphsons method in Matlab?
body: <p>Newtons-Raphsons method is easy to implement in Mathematica but in Matlab it seems a bit difficult. I don't get if I can pass a function to a function and how to use the derivative as a function.</p>
  
  <pre><code>newtonRaphson[f_, n_, guess_] := 
   If[n == 0, guess, newtonRaphson[f, n - 1, guess - f[guess]/f'[guess]]]
  newtonRaphsonOptimize[f_, n_, guess_] := 
   If[n == 0, guess, 
    newtonRaphsonOptimize[f, n - 1, guess - f'[guess]/f''[guess]]]
  </code></pre>
  
  <p>It doesn't seem like you can derive neither function-handles nor functions defined in a file but I might be wrong.</p>