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: loadRefScan.m
    path of file: ./repos/osprey/load/priam
    
    the code of the file until where you have to start completion: function [cpx_file, Ref, img_array, img_body ,noise_array, noise_body] = loadRefScan(cpx_file)
%% [cpx_file ,Ref, img_array, img_body, noise_array, noise_body] = loadRefScan(cpx_file)
%   Loads a Philips coil reference scan (*.cpx format).
%
%   Input:
%       cpx_file    Coil sensitivity scan (*.cpx).
%
%   Output:
%       ref_file    cpx file used
%       Ref         struct containing dimensional information
%       img_array   4D stack of receiver coil images
%                   [number of coils, x, y, z]
%       img_body    4D stack of body coil images

    
function [cpx_file, Ref, img_array, img_body ,noise_array, noise_body] = loadRefScan(cpx_file)
%% [cpx_file ,Ref, img_array, img_body, noise_array, noise_body] = loadRefScan(cpx_file)
%   Loads a Philips coil reference scan (*.cpx format).
%
%   Input:
%       cpx_file    Coil sensitivity scan (*.cpx).
%
%   Output:
%       ref_file    cpx file used
%       Ref         struct containing dimensional information
%       img_array   4D stack of receiver coil images
%                   [number of coils, x, y, z]
%       img_body    4D stack of body coil images
%       noise_array 2D stack of receiver coil noise signals
%                   [number of coils, number of pixels estimated for noise]
%       noise_body  2D stack of body coil noise signals
%
%
%   Author:
%       Dr. Georg Oeltzschner (Johns Hopkins University, 2018-03-15)
%       goeltzs1@jhmi.edu
%   
%   Credits:    
%       This code is based on an initial PRIAM reconstruction routine.
%       Dr. Vincent O. Boer (vincentob@drcmr.dk)
%       Danish Research Centre for Magnetic Resonance (Hvidovre Hospital)
%
%   History:
%       2018-03-15: First version of the code.
%


% Check whether .cpx file exists
if ~isfile(cpx_file) 
    msg = 'Coil sensitivity file (*.cpx) not found.';
    error(msg);   
end