I am reading the following paper:
http://www.nova.edu/ocean/Physics/PDF/Solovievetal2007.pdf
and am trying to write a MATLAB program to solve equation 1.26, which is shown as:
$$ K_{int} = \frac{A_{0} u_{*} \left(1 - a_{0}^3 \Lambda_{0}^4 Rf_{0}\right)^{1/4}}{Sc^{1/2}\Lambda_{0} \left( 1 + Ke / Ke_{cr} \right)^{1/2}} f\left(Rf_{0}, Ke, A_{w}\right), $$
where
$$ f = \left[ 1 + \frac{39.5 W}{\left(2\pi\right)^{3/2}A_{0}^4} \left(\frac{1}{W^{1/4}} - 1 \right) \\ \left( \frac{3}{BS_{q}}\right)^{1/2} \left( \frac{\rho \nu^{2} Ke} {\rho_{a} \nu_{a}^{2} Ke_{cr}} \right)^{1/2} \frac{\alpha_{w} a_{0}^{3} \Lambda_{0}^4 \left( 1 + Ke/Ke_{cr}\right)^{1/2}} {\left( 1 - a_{0}^{3} \Lambda_{0}^{4} Rf_{0} \right) \kappa c_{T} A_{w}^{1/2} R_{Bcr}} \right]^{1/4} $$
My question is: how do I re-write this into one equation? Does $f$ substitute for $f\left( Rf_{0}, Ke, A_{w}\right)$, so that the full equation is written as:
$$ K_{int} = \frac{A_{0} u_{*} \left(1 - a_{0}^3 \Lambda_{0}^4 Rf_{0}\right)^{1/4}}{Sc^{1/2}\Lambda_{0} \left( 1 + Ke / Ke_{cr} \right)^{1/2}} \left[ 1 + \frac{39.5 W}{\left(2\pi\right)^{3/2}A_{0}^4} \left(\frac{1}{W^{1/4}} - 1 \right) \\ \left( \frac{3}{BS_{q}}\right)^{1/2} \left( \frac{\rho \nu^{2} Ke} {\rho_{a} \nu_{a}^{2} Ke_{cr}} \right)^{1/2} \frac{\alpha_{w} a_{0}^{3} \Lambda_{0}^4 \left( 1 + Ke/Ke_{cr}\right)^{1/2}} {\left( 1 - a_{0}^{3} \Lambda_{0}^{4} Rf_{0} \right) \kappa c_{T} A_{w}^{1/2} R_{Bcr}} \right]^{1/4} $$
Any advice would be appreciated
I would honestly suggest just using it as two different expressions. I am assuming that you are going to be using the fzero() function, which takes a function handle as an argument.
To do this, go create a MATLAB function file, and put a function in it called Kint, which contains the above two expressions, and returns Kint. Make the input whichever variable you want to solve for.
Then go to the command-line and type: fzero(@Kint,) where is the initial guess for a solution, and the starting point for the search.