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: pm_smooth_phasemap.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/toolbox/FieldMap
    
    the code of the file until where you have to start completion: function pm = pm_smooth_phasemap(pm,angvar,vxs,fwhm)
% Performs a weighted (by 1/angvar) gaussian smoothing
% of a phasemap.
% FORMAT: pm = pm_smooth_phasemap(pm,angvar,vxs,fwhm)
%
% Input:
% pm         : Phase-map
% angvar     : Map of uncertainty of the angular estimate.
% vxs        : Voxel sizes (mm) in the three directions.
% fwhm       : FWHM (mm) of gaussian kernel for the three 
%              directions (or scalar for isotropic kernel).
%__________________________________________________________
% Jesper Andersson 16/10-03
%_______________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Jesper Andersson 
% $Id: pm_smooth_phasemap.m 1317 2008-04-08 16:16:38Z chloe $


    
function pm = pm_smooth_phasemap(pm,angvar,vxs,fwhm)
% Performs a weighted (by 1/angvar) gaussian smoothing
% of a phasemap.
% FORMAT: pm = pm_smooth_phasemap(pm,angvar,vxs,fwhm)
%
% Input:
% pm         : Phase-map
% angvar     : Map of uncertainty of the angular estimate.
% vxs        : Voxel sizes (mm) in the three directions.
% fwhm       : FWHM (mm) of gaussian kernel for the three 
%              directions (or scalar for isotropic kernel).
%__________________________________________________________
% Jesper Andersson 16/10-03
%_______________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Jesper Andersson 
% $Id: pm_smooth_phasemap.m 1317 2008-04-08 16:16:38Z chloe $

if nargin ~= 4 | nargout ~= 1
   help pm_smooth_phasemap
   pm = [];
   return;
end