Home > General-Functions > SUGR > E-Matrix > demo_sugr_E_matrix.m

demo_sugr_E_matrix

PURPOSE ^

% test sugr_E_matrix

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% test sugr_E_matrix


 Wolfgang Förstner 03/2011
 wfoerstn@uni-bonn.de

 See also sugr_E_Matrix

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% test sugr_E_matrix
0002 %
0003 %
0004 % Wolfgang Förstner 03/2011
0005 % wfoerstn@uni-bonn.de
0006 %
0007 % See also sugr_E_Matrix
0008 
0009 clearvars
0010 close all
0011 
0012 addpath(genpath('../../../General-Functions'));
0013 
0014 %%
0015 disp('------------------')
0016 disp('E = sugr_E_Matrix(A)')
0017 A = randn(3);
0018 E = sugr_E_Matrix(A);
0019 normE = norm(E.E(:))                                                       %#ok<*NOPTS,*NASGU>
0020 rankE = rank(E.E)
0021 
0022 
0023 %%
0024 disp('--------------------')
0025 disp('E = sugr_E_Matrix(b,R)')
0026 b = randn(3,1);
0027 R = calc_Rot_r(randn(3,1));
0028 E = sugr_E_Matrix(b,R);
0029 bR = E.bR
0030 normE = norm(E.E(:))
0031 rankE = rank(E.E)
0032 %%
0033 %
0034 %
0035 disp('--------------------')
0036 disp('E = sugr_E_matrix(b,R,CbRbR)')
0037 b = randn(3,1);
0038 R = calc_Rot_r(randn(3,1));
0039 B = randn(5);
0040 CbRbR = B'*B;
0041 E = sugr_E_Matrix(b,R,CbRbR);
0042 bR = E.bR
0043 checkR = R'*R-eye(3)
0044 normE = norm(E.E(:))
0045 rankE = rank(E.E)
0046 rankCee = rank(E.Cee)
0047 checkCbRbR = E.CbRbR-pinv(E.JebR)*E.Cee*pinv(E.JebR)'
0048 
0049 %
0050 disp('--------------------')
0051 disp('E=sugr_E_matrix(b,R,Cee)')
0052 b = randn(3,1);
0053 R = calc_Rot_r(randn(3,1));
0054 B = randn(9);
0055 Cee = B'*B;
0056 E = sugr_E_Matrix(b,R,Cee);
0057 bR = E.bR
0058 checkR = R'*R-eye(3)
0059 normE = norm(E.E(:))
0060 rankE = rank(E.E)
0061 rankCee = rank(E.Cee)
0062 checkCee = E.Cee-E.JebR*E.CbRbR*E.JebR'
0063 
0064 
0065

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005