If you have a set of 3D points and you want to fit a Gaussian ellipsoid to them, you might profit with this code:

X = [x y z];

Y = [x1 y1 z1];

C1 = cov(X); M1 = mean(X);

C2 = cov(Y); M2 = mean(Y);

p1 = plot_gaussian_ellipsoid(M1,C1);hold on

p2 = plot_gaussian_ellipsoid(M2,C2);hold on

set(p1,'FaceColor','g','EdgeColor','g','FaceAlpha',.2);

set(p2,'FaceColor','b','EdgeColor','b','FaceAlpha',.2);

**References:**

## No comments:

## Post a Comment