-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrotY.m
28 lines (23 loc) · 1018 Bytes
/
rotY.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function C_y = rotY(alpha)
%‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
% ROTY Basic rotation about y-axis by an angle alpha.
%
% INPUT:
% * alpha, angle scalar [rad]
%
% OUTPUT:
% * C, Coordinate transformation matrix (3 x 3) matrix []
%
% Author: Livio Bisogni
%_______________________________________________________________________________________________________
% Check number of arguments
narginchk(1,1);
if (~isscalar(alpha))
error('alpha must be a scalar.');
end
ca = cos(alpha);
sa = sin(alpha);
C_y = [ca, 0, -sa;
0, 1, 0;
sa, 0, ca];
end