Home > subfunctions > ccl_math_rotmat.m

ccl_math_rotmat

PURPOSE ^

R = ccl_math_rotmat(theta_k, current_Rn, search, alpha_id)

SYNOPSIS ^

function R = ccl_math_rotmat(theta_k, current_Rn, search, alpha_id)

DESCRIPTION ^

 R = ccl_math_rotmat(theta_k, current_Rn, search, alpha_id)

 Calculate rotation matrix after finding the k^th constraint vector.
 The result is rotation matrix that rotate vectors into a space orthogonal to all constraint vectors

 Input:
   theta_k                               Theta from kth constrains
   current_Rn                            Rotation matrix from the last iteration
   search                                Dimensionality related searching parameters
   alpha_id                              Current searching dimension of alpha

 Output:
   R                                     Rotation matrix

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function R = ccl_math_rotmat(theta_k, current_Rn, search, alpha_id)
0002 % R = ccl_math_rotmat(theta_k, current_Rn, search, alpha_id)
0003 %
0004 % Calculate rotation matrix after finding the k^th constraint vector.
0005 % The result is rotation matrix that rotate vectors into a space orthogonal to all constraint vectors
0006 %
0007 % Input:
0008 %   theta_k                               Theta from kth constrains
0009 %   current_Rn                            Rotation matrix from the last iteration
0010 %   search                                Dimensionality related searching parameters
0011 %   alpha_id                              Current searching dimension of alpha
0012 %
0013 % Output:
0014 %   R                                     Rotation matrix
0015 
0016 R = eye(search.dim_u) ;
0017 for d = alpha_id : search.dim_t
0018     R = R * ccl_math_mgmat(search.dim_u, d, d+1, theta_k(d) )' ;
0019 end
0020 R = R * current_Rn ;
0021 end

Generated on Mon 01-Jan-2018 15:49:39 by m2html © 2005