close all;
clear all;
m = [3 1 2]';
E = [1 0 0; 0 5 4; 0 4 5];

% m0 = [2 1 1]';
% E0 = [1 0 0; 0 5 3; 0 3 5];


x0 = [5 6 3]';

[O P] = eig(E);
(x0-m)' * inv(E) * (x0-m)
m_dist = 1/((2*pi)^(3/2) * det(E)^(1/2)) * exp(-((x0-m)' * inv(E) * (x0-m))/2)
A_w = O * P^(-1/2)


x_w = A_w' * (x0-m)

x_w' * x_w