Syntax
R=rotdeg(wx,wy,wz)
Input Parameter
wx : | | angle for x-rotation in Deg |
wy : | | angle for y-rotation in Deg |
wz : | | angle for z-rotation in Deg |
Output Parameter
Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, rotdeg
, computes a 3x3 rotation matrix for given rotation angles in degrees around the x, y, and z axes. It is part of the SG-Library and was developed by Tim Lueth.
Input Parameters
- wx: Angle for rotation around the x-axis in degrees.
- varargin: Optional parameters for angles around the y-axis and z-axis in degrees.
Output
- R: A 3x3 rotation matrix.
Algorithm Explanation
The function begins by defining a conversion factor f
to convert degrees to radians, which is pi/180
.
The function checks the number of input arguments using nargin
:
- If there is only one input argument (
nargin==1
), it assumes a single rotation around the x-axis. It converts wx
from degrees to radians by multiplying with f
and calls the rot
function with this value.
- If there are more than one input arguments, it assumes rotations around all three axes. It converts
wx
, varargin{1}
(which is wy
), and varargin{2}
(which is wz
) from degrees to radians by multiplying each with f
. It then calls the rot
function with these three values.
The function relies on an external function rot
to compute the actual rotation matrix from the given angles in radians.
Algorithm explaination created using ChatGPT on 2025-08-18 22:25. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21