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: FieldMap_Run.m
    path of file: ./repos/bspm/thirdparty/spm8/toolbox/FieldMap
    
    the code of the file until where you have to start completion: function vdm = Fieldmap_Run(job)
% Auxillary file for running FieldMap jobs

    
function vdm = Fieldmap_Run(job)
% Auxillary file for running FieldMap jobs
%
% FORMAT vdm = Fieldmap_Run(job)
%
% job  - FieldMap job structure containing following elements
%        common to all jobs and specific to the type of job
%     Common to all jobs:
%        defaults - cell array containing name string of the defaults file
%        options - structure containing the following:
%           epi - cell array containing name string of epi image to unwarp
%           matchvdm - match vdm to epi or not (1/0)
%           writeunwarped - write unwarped EPI or not (1/0)
%           anat - cell array containing name string of anatomical image
%           matchanat - match anatomical image to EPI or not (1/0)
%
%     Elements specific to job type:
%        precalcfieldmap - name of precalculated fieldmap
%
%        phase - name of phase image for presubtracted phase/mag job
%        magnitude - name of magnitude image for presubtracted phase/mag job
%
%        shortphase - name of short phase image for phase/mag pair job
%        longphase - name of short phase image for phase/mag pair job
%        shortmag - name of short magnitude image for phase/mag pair job
%        longmag - name of short magnitude image for phase/mag pair job
%
%        shortreal - name of short real image for real/imaginary job
%        longreal - name of long real image for real/imaginary job
%        shortimag - name of short imaginary image for real/imaginary job
%        longimag - name of long imaginary image for real/imaginary job
%
%_______________________________________________________________________
% Copyright (C) 2007 Wellcome Department of Imaging Neuroscience

% Chloe Hutton & Jesper Andersson
% $Id: FieldMap_Run.m 4571 2011-11-23 17:34:12Z chloe $
%_________________________________________________________________

%
%----------------------------------------------------------------------
% Set up default parameters and structures
%----------------------------------------------------------------------

% Open the FieldMap control window with visibility off. This allows the
% graphics display to work.
FieldMap('Welcome','Off');
%IP = FieldMap('Initialise'); % Gets default params from pm_defaults

% Here load the selected defaults file if selected
if isfield(job.defaults,'defaultsfile')
    m_file = job.defaults.defaultsfile;
    m_file = m_file{1}(1:end