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_MDP_G.m
    path of file: ./repos/bspm/thirdparty/spm12/toolbox/DEM
    
    the code of the file until where you have to start completion: function [G] = spm_MDP_G(A,x)
% auxiliary function for Bayesian suprise or mutual information
% FORMAT [G] = spm_MDP_G(A,x)
%
% A   - likelihood array (probability of outcomes given causes)
% x   - probability density of causes
%
%__________________________________________________________________________
% Copyright (C) 2005 Wellcome Trust Centre for Neuroimaging

% Karl Friston
% $Id: spm_MDP_G.m 6812 2016-06-18 11:16:21Z karl $


% get Bayesian surprise or mutual information
%==========================================================================

% normalisation of a probability transition matrix (columns)
%--------------------------------------------------------------------------
p0   = exp(-16);

    
function [G] = spm_MDP_G(A,x)
% auxiliary function for Bayesian suprise or mutual information
% FORMAT [G] = spm_MDP_G(A,x)
%
% A   - likelihood array (probability of outcomes given causes)
% x   - probability density of causes
%
%__________________________________________________________________________
% Copyright (C) 2005 Wellcome Trust Centre for Neuroimaging

% Karl Friston
% $Id: spm_MDP_G.m 6812 2016-06-18 11:16:21Z karl $


% get Bayesian surprise or mutual information
%==========================================================================

% normalisation of a probability transition matrix (columns)
%--------------------------------------------------------------------------
p0   = exp(-16);
G    = 0;
qo   = 0;
qx   = 1;

% probability distribution over the hidden causes
%--------------------------------------------------------------------------
for f = 1:numel(x)
    qx = spm_cross(qx,x{f});
end