You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sw_adtg.m
    path of file: ./repos/matlab_owc/lib/seawater_330_its90
    
    the code of the file until where you have to start completion: 
function ADTG = sw_adtg(S,T,P)

% SW_ADTG    Adiabatic temperature gradient
%===========================================================================
% SW_ADTG   $Id: sw_adtg.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%           Copyright (C) CSIRO, Phil Morgan  1992.
%
% adtg = sw_adtg(S,T,P)
%
% DESCRIPTION:
%    Calculates adiabatic temperature gradient as per UNESCO 1983 routines.
%
% INPUT:  (all must have same dimensions)
%   S = salinity    [psu      (PSS-78) ]
    
function ADTG = sw_adtg(S,T,P)

% SW_ADTG    Adiabatic temperature gradient
%===========================================================================
% SW_ADTG   $Id: sw_adtg.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%           Copyright (C) CSIRO, Phil Morgan  1992.
%
% adtg = sw_adtg(S,T,P)
%
% DESCRIPTION:
%    Calculates adiabatic temperature gradient as per UNESCO 1983 routines.
%
% INPUT:  (all must have same dimensions)
%   S = salinity    [psu      (PSS-78) ]
%   T = temperature [degree C (ITS-90)]
%   P = pressure    [db]
%       (P may have dims 1x1, mx1, 1xn or mxn for S(mxn) )
%
% OUTPUT:
%   ADTG = adiabatic temperature gradient [degree_C/db]
%
% AUTHOR:  Phil Morgan, Lindsay Pend