A=double((unifrnd(0,1,50,2048)));
B=double((unifrnd(0,1,40,2048)));
A(:,5) = A(:,5) + 9; A(:,7) = A(:,7) + 9; A(:,9) = A(:,9) + 9; A(:,11) = A(:,11) + 9; A(:,13) = A(:,13) + 9;
%matrix division would fail due 0 determinant if sum of covariance matrixes is constant for selected properties
%A(:,5) = 9; A(:,7) = 9; A(:,9) = 9; A(:,11) = 9; A(:,13) = 9;
%B(:,5) = 0; B(:,7) = 0; B(:,9) = 0; B(:,11) = 0; B(:,13) = 0;
%mrses(A,B,5,1,60);
%mrses(A,B,5,10,60);
%mrses(A,B,5,500,1000)
%res=mrses(A,B,5,1,1000);

%res=mrses(A,B,5,10,500);
%res=mrses(A,B,5,500,1000);
%res=mrses_orig(A,B,5,500,1000);
%res=mrses_octave(A,B,5,500,1000);

%{
res=mrses_hw_distance(A,B,5,500,1000);

fprintf('\n')
disp(' top properties / percentage')
fprintf('%8u ', int32(res(1:10,2))')
fprintf('\n')
fprintf('%7.2f%% ', 100*res(1:10,1)')
fprintf('\n\n')
%}

res=mrses_mtx(A,B,5,500,1000);
(res+1)'
