SBE16 plus Dissolved Oxygen Saturation MATLAB Implementation

function oxygen = sbe16p_dissolved_oxygen ( Soc, offset, Boc, TCor, Pcor, p, volts, t, s, oxsat )
% SBE16P_DISSOLVED_OXYGEN:  Compute dissolved oxygen product for SBE 16plus SEACAT.
%
% From the manual, "Sea-Bird uses a slightly modified version of the algorithm by Owens
% and Millard (1985) to convert SBE 43 oxygen sensor data to oxygen concentration.  The
% Sea-Bird algorithm incorporates a term related to the offset voltage produced for zero
% oxygen current.  In addition, a modification to the Boc term is required, because the SBE 43
% output is temperature compensated by exp(-0.03T) [ i.e. Tcor = -0.03 ].
%
% PARAMETERS:
%   Output:
%      oxygen:  dissolved oxygen (ml/l)
%   Input:
%      First five cals:
%         soc
%         offset
%         boc
%         tcor
%         Pcor
%      pressure
%      volts:  
%      t,s:  temperature and salinity
%      oxsat:  saturated oxygen (must be computed)
%
% REFERENCE:
%   Application Note NO. 64
%   SBE 43 Dissolved Oxygen Sensor
%   Dated March 2001
%


oxygen = (Soc * (volts + offset) + Boc*exp(-0.03*t)).*exp(TCor*t + Pcor*p).*oxsat;

return;