Home > subfunctions > ccl_math_mgmat.m

ccl_math_mgmat

PURPOSE ^

G = ccl_math_mgmat(dim, i, j, theta)

SYNOPSIS ^

function G = ccl_math_mgmat(dim, i, j, theta)

DESCRIPTION ^

 G = ccl_math_mgmat(dim, i, j, theta)
 Generate rotation matrix of a plane rotation of degree theta in an arbitrary plane and dimension R

 Input:
   dim                                    Dimensionality of the rotation matrix
   i,j                                    Row and Col index of the matrix
   theta                                  Degree of rotation
 Output:
   G                                      Rotation matrix

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function G = ccl_math_mgmat(dim, i, j, theta)
0002 % G = ccl_math_mgmat(dim, i, j, theta)
0003 % Generate rotation matrix of a plane rotation of degree theta in an arbitrary plane and dimension R
0004 %
0005 % Input:
0006 %   dim                                    Dimensionality of the rotation matrix
0007 %   i,j                                    Row and Col index of the matrix
0008 %   theta                                  Degree of rotation
0009 % Output:
0010 %   G                                      Rotation matrix
0011 
0012 G      = eye(dim) ;
0013 G(i,i) = cos(theta) ;
0014 G(j,j) = cos(theta) ;
0015 G(i,j) =-sin(theta) ;
0016 G(j,i) = sin(theta) ;
0017 end

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