added matlab wrapper for distribution output