gaussian: with matrix