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_ptmp.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_ptmp(S,T,P,PR)

% SW_PTMP    Potential temperature
%===========================================================================
% SW_PTMP  $Id: sw_ptmp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%          Copyright (C) CSIRO, Phil Morgan 1992.
%
    
function PT = sw_ptmp(S,T,P,PR)

% SW_PTMP    Potential temperature
%===========================================================================
% SW_PTMP  $Id: sw_ptmp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
%          Copyright (C) CSIRO, Phil Morgan 1992.
%
% USAGE:  ptmp = sw_ptmp(S,T,P,PR)
%
% DESCRIPTION:
%    Calculates potential temperature as per UNESCO 1983 report.
%
% INPUT:  (all must have same dimensions)
%   S  = salinity    [psu      (PSS-78) ]
%   T  = temperature [degree C (ITS-90)]
%   P  = pressure    [db]
%   PR = Reference pressure  [db]
%        (P & PR may have dims 1x1, mx1, 1xn or mxn for S(mxn) )
%
% OUTPUT:
%   ptmp = Potential temperature relative to PR [degree C (ITS-90)]
%
% AUTHOR:  Phil Morgan 92-04-06, Lindsay Pend