Create calc_density.m

Calculates log density