Home > .. > Matlab_Uncertain_Frames_sz > check_simulated_motion_z.m

check_simulated_motion_z

PURPOSE ^

% check whether Ms has mean M0 and CovM C0

SYNOPSIS ^

function check_simulated_motion_z(M0,C0,Ms,S)

DESCRIPTION ^

%  check whether Ms has mean M0 and CovM C0
   partially exponential representation

 M0    [3x3] mean motion zeta
 C0    [6x6] theoretical CovM if zeta
 Ms    [16xN] sample of motions zeta
 S     significance level

 wf 5/2020

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function check_simulated_motion_z(M0,C0,Ms,S)
0002 %%  check whether Ms has mean M0 and CovM C0
0003 %   partially exponential representation
0004 %
0005 % M0    [3x3] mean motion zeta
0006 % C0    [6x6] theoretical CovM if zeta
0007 % Ms    [16xN] sample of motions zeta
0008 % S     significance level
0009 %
0010 % wf 5/2020
0011 
0012 % number of samples
0013 N = size(Ms,2);
0014 
0015 % analyse data
0016 zeta_s=zeros(N,6);
0017 for n=1:N
0018     zeta_s(n,:)= calc_z_from_M_M0(reshape(Ms(:,n),4,4),(M0));
0019 end
0020 
0021 % check mean and CovM
0022 check_estimation_result(6, zeros(6,1), C0, ones(N,1), zeta_s, S, ' motions z');
0023 
0024 CovM_z=cov(zeta_s);
0025 sigmas_z=sqrt(diag(CovM_z)')
0026 
0027 %% the same assuming the exponential representation
0028 % analyse data
0029 s_s=zeros(N,6);
0030 for n=1:N
0031     s_s(n,:)= calc_s_from_A(reshape(Ms(:,n),4,4)*inv(M0));
0032 end
0033 
0034 % check mean and CovM
0035 check_estimation_result(6, zeros(6,1), C0, ones(N,1), s_s, S, ' motions z/s');
0036 
0037 check_estimation_result(3, zeros(3,1), C0(1:3,1:3), ones(N,1), s_s(:,1:3), S, ' rotations z/s');
0038 check_estimation_result(3, zeros(3,1), C0(4:6,4:6), ones(N,1), s_s(:,4:6), S, ' translations z/s');
0039 
0040 
0041 CovM_z_s=cov(s_s);
0042 
0043 sigmas_z_s=sqrt(diag(CovM_z_s)')
0044 end
0045

Generated on Wed 10-Jun-2020 19:54:31 by m2html © 2005