MATLAB: Calculate wet bulb temperature from ambient temp, dew point, and atmospheric pressure

iterativeMATLABsolverwet bulb

Any suggestions for calculating wet bulb temperatures from a large set of weather observations?
I have air temp (degrees C), dew point (C), and pressure (kPa) read in as 1-column matrices (~775,000 rows).
Any and all suggestions are appreciated.
In Excel, I use iterative calculations to solve for wet bulb temperature. I haven't used any solver features in Matlab, and I'm not sure how to get started. I don't currently have the symbolic math toolbox, so if there's a way to do this without, that would be great.
This is an example of what I want to do,
but it only calculates wet bulb for a single observation, and not for a whole dataset. Any ideas of how to adapt it to my purposes?
Thanks!

Best Answer

Simplest would be to move all of the functions into a single m-file and turn the outer script into a function and thereby be able to get rid of the (ugh!!) globals and then use arrayfun to pass the required data.
Your next mission, should you choose to accept, is to recode a new solution using one of the supplied Matlab solvers.