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_barh.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8
    
    the code of the file until where you have to start completion: function spm_barh(E,C,P)
% density plotting function (c.f. bar - horizontal)
% FORMAT spm_barh(E,C,[P])
% E   - (n x 1) expectation
% C   - (n x 1) variances
% P   - (n x 1) priors
%___________________________________________________________________________

    
function spm_barh(E,C,P)
% density plotting function (c.f. bar - horizontal)
% FORMAT spm_barh(E,C,[P])
% E   - (n x 1) expectation
% C   - (n x 1) variances
% P   - (n x 1) priors
%___________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Karl Friston
% $Id: spm_barh.m 1143 2008-02-07 19:33:33Z spm $



% densities
%---------------------------------------------------------------------------
n     = length(E);
H     = zeros(2*n + 1,64);
x     = linspace(min(E - 4*sqrt(C)),max(E + 4*sqrt(C)),64);
for i = 1:n
    H(2*i,:) = exp(-[x - E(i)].^2/(2*C(i)));
end