function lse = logsumexp(x) % returns a vector with the logarithm of the sum of exponents in each % column maxlog = max(x); lse = op(log(sum(exp(op(x,'-',maxlog)))),'+',maxlog);