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: spm_hilbert.m
    path of file: ./repos/ExploreASL/External/SPMmodified
    
    the code of the file until where you have to start completion: function [x] = spm_hilbert(xr)
% Computes analytic signal
% FORMAT [x] = spm_hilbert(xr)
%

    
function [x] = spm_hilbert(xr)
% Computes analytic signal
% FORMAT [x] = spm_hilbert(xr)
%
% Returns analytic signal x = xr + i*xi such that 
% xi is the Hilbert transform of real vector xr.
%__________________________________________________________________________
% Copyright (C) 2009 Wellcome Trust Centre for Neuroimaging
 
% Will Penny
% $Id: spm_hilbert.m 4024 2010-07-28 18:43:19Z guillaume $

if ~isreal(xr)
  xr = real(xr);
end