Update em.m

Almost implemented em algorithm. I still need to fix some details and re-read the code.
I also need to figure out how to store matrices within matrices.  If that is not possible, then I have to find some other solution to that problem.