I get example from book to calculate mahalanobis and eucledian distance as shown below, but the book doesn't provide ilustration, so i trying to make plotting data point of gaussian distribution of two class based on its mean and covariance value . But I am not convident with the result that i got. Since the data that i generate from information quite complicated, and end up confusing me with the result. The result says data point x classifies in first class based on euclidean distance and classified in second class based on mahalanobis distance.
Here the example of the book
z_euc=euclidean_classifier(m,x)
z_mahal=mahalanobis_classifier(m,S,x)
Here my attemp to ilustrate the distribution of point in 3D
pdf1 = bsxfun(@plus,me,s.*randn(500,3));
plot3(pdf1(:,1),pdf1(:,2),pdf1(:,3),'.r')
pdf2 = bsxfun(@plus,m2',s.*randn(500,3));
plot3(pdf2 (:,1),pdf2 (:,2),pdf2 (:,3),'.b')
plot3(x(1),x(2),x(3),'og',MarkerFaceColor='g')