When I use Kmeans to generate clusters I have the means and the cluster indexes, I then calculate the Covariance's from the clusters. I want to put the means and Covariances into a gmdistribution object so that I can call ezcontour to contour the distributino over the scatter plot. However, when I try to change the values of elements of the gmdistribution object (obj1) as obj1.mu(1,1)=4 for example, I get: ??? Error using ==> gmdistribution.subsasgn at 8 Subscripted assignments are not allowed.
If I cant modify elements of an object how do I build an object so I can contour the clusters?