 <p>In answer to your two questions:</p> <ol> <li><p>The call to <code>fsolve</code> is using an <a href="http://infoshako.sk.tsukuba.ac.jp/ShakoDoc/MATLAB5/help/toolbox/optim/fsolve.html" rel="nofollow">old MATLAB syntax</a> for passing an argument to the objective function. The call is optimizing for the objective function <code>@(x) fun1(x, pH)</code> starting from the initial value <code>1</code> and passing no options (<code>[]</code>). For recent versions of MATLAB this should be written</p> <p><code>fsolve(@(x) fun1(x, pH), 1)</code></p></li> <li><p><code>fun1</code> is a <a href="http://www.mathworks.com/help/techdoc/matlab_prog/f4-39683.html" rel="nofollow">nested function</a> so can be called from within it's parent function <code>pH2Fb</code>.</p></li> </ol>