Rotate a coordinate about an axis

버전 1.2.3 (8.91 KB) 작성자: fsgeek
Rotates a reference coordinate (vector) about an axis. The reference and rotation axes can be defined in spherical or Cartesian coordinates.
다운로드 수: 15
업데이트 날짜: 2023/3/14

라이선스 보기

Summary
[varargout] = vecrotvec(varargin) rotates a reference coordinate (vector) about an axis. The reference and rotation axes can be defined in spherical or Cartesian coordinates.
Please be aware of the following before using vecrotvec:
  • Axes defined by spherical coordinates are unit vectors (r = 1)
  • Angles are expected in radians
Files
Main vecrotvec function (user runs this function):
vecrotvec.m
Validation cases (user runs this function):
vecrotvec_validate.m
Calculation function (internal use only):
vecrotvec_internal_calc.m
Plotting function (internal use only):
vecrotvec_internal_plot.m
Additional methods used by vecrotvec (internal use only):
vecrotvec_internal.m
Acknowledgements

인용 양식

fsgeek (2024). Rotate a coordinate about an axis (https://www.mathworks.com/matlabcentral/fileexchange/125950-rotate-a-coordinate-about-an-axis), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2022b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.3

Updated description

1.2.2

Minor code optimisations

1.2.1

Fixed bug where rotation about cardinal 3-direction produced NaN result

1.2.0

- Fixed bug in legend text
- Arrow heads are automatically added to the MATLAB figure if the user has ARROW3.M by Tom Davis: https://tinyurl.com/bxzskwk6

1.1.1

- Bug fixes
- Improved documentation
- User can now disable axis vector normalization with user setting

1.1.0

MATLAB figure now includes "sweep" effect to visualize the rotation

1.0.9

- Improved documentation of THRESHOLD user setting
- Improved appearance of MATLAB figure legend

1.0.8

- Function now outputs reference angles
- Results are now plotted in an optional MATLAB figure

1.0.7

Updated submission title

1.0.6

Updated documentation

1.0.5

Updated image to reflect correct angle convenrion

1.0.4

Fixed crash

1.0.3

Updated error messages

1.0.2

Updated error messages

1.0.1

Updated documentation

1.0.0