function total = fun( parameters )
global eruptions
mu1 = parameters(1)
sigma1 = parameters(2)
mu2 = parameters(3)
sigma2 = parameters(4)
p = parameters(5)
total = 0.0
for i=1:length(eruptions)
    x = eruptions(i)
    total = total + x
    % total = total - log( p*phi(...) + (1-p)*phi(...) )
end
