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_temp.m
    path of file: ./repos/matlab_owc/lib/seawater_330_its90
    
    the code of the file until where you have to start completion: 
function PT = sw_temp(S,T,P,PR)

% SW_TEMP    Temperature from potential temperature
%===========================================================================
% TEMP  $Id: sw_temp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%       Copyright (C) CSIRO, Phil Morgan  1992.
%
% USAGE:  temp = sw_temp(S,PTMP,P,PR)
%
% DESCRIPTION:
%    Calculates temperature from potential temperature at the reference
%    pressure PR and in-situ pressure P.
    
function PT = sw_temp(S,T,P,PR)

% SW_TEMP    Temperature from potential temperature
%===========================================================================
% TEMP  $Id: sw_temp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%       Copyright (C) CSIRO, Phil Morgan  1992.
%
% USAGE:  temp = sw_temp(S,PTMP,P,PR)
%
% DESCRIPTION:
%    Calculates temperature from potential temperature at the reference
%    pressure PR and in-situ pressure P.
%
% INPUT:  (all must have same dimensions)
%   S     = salinity              [psu      (PSS-78) ]
%   PTMP  = potential temperature [degree C (ITS-90)]
%   P     = pressure              [db]
%   PR    = Reference pressure    [db]
%           (P may have dims 1x1, mx1, 1xn or mxn for S(mxn) )
%
% OUTPUT:
%   temp = temperature [degree C (ITS-90)]
%
% AUTHOR:  Phil Morgan 92-04-06, Lindsay Pend