%%
%% Written by Alexander Stoytchev
%%
%% Demonstrate the trick with the dimentions
%% This time we use only the first two readings

%% Find the eigenvalues of the larger 3x3 matrix
A  = [X1_m, X2_m]
CC= (1/2)*A*A'
[VV,DD]=eigs(CC)

%% Find the eigenvalues of the smaller 2x2 matrix
cc = 1/2 * A'*A
[vv,dd]=eigs(cc)

% Now calculate the eigenvectors in the larger space (must be normalized)
VV1 = A*vv(:,1);
VV1 = VV1 ./norm(VV1)

VV2 = A*vv(:,2);
VV2 = VV2 ./norm(VV2)

%% Check that this is true
%% VV1 == VV(:,1)
%% VV2 == VV(:,2)

