Generate an Orthogonal Set of Unit Vectors

버전 1.0.0.0 (32.1 KB) 작성자: Dan Couture
Given a vector, a set of orthogonal unit vectors is calculated to use as rotated coordinate axes.
다운로드 수: 678
업데이트 날짜: 2012/8/13

라이선스 보기

Ex 1:
z_in = [0 0 5]';
[x, y, z] = orthogonal_set(z_in);

Supplied with the z axis, two perpendicular unit vectors are created in the xy plane.

Ex 2:
n = [1 -2 5]';
[x, y, z] = orthogonal_set(n);

Supplied with a normal vector, the returned orthogonal set of unit vectors will have a z vector parallel to the normal and an x and y vector that can be used to describe the plane that has n as a normal.

Test Scripts:

t_orthogonal_set.m - unit test the function and ensure the resulting vectors are a correct orthogonal set

t_show_me.m - A quick script that generates the screenshot image

인용 양식

Dan Couture (2024). Generate an Orthogonal Set of Unit Vectors (https://www.mathworks.com/matlabcentral/fileexchange/37794-generate-an-orthogonal-set-of-unit-vectors), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

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