Take a vector and convert it to a unit vector (normalize)

버전 1.3.0.0 (1.58 KB) 작성자: James West
normalize a vector to a unit vector
다운로드 수: 1.5K
업데이트 날짜: 2010/8/31

라이선스 보기

This function will take a [1xn] or [mx1] vector and normalize it to a unit vector length.

To use this function [vectorOut] = fcn_createUnitVector(vectorIn)

Error checking is performed to test for NaN values in the output, and a square root of the sum of the squares == 1

This function will take column or row vectors and output in said format.

인용 양식

James West (2025). Take a vector and convert it to a unit vector (normalize) (https://kr.mathworks.com/matlabcentral/fileexchange/28605-take-a-vector-and-convert-it-to-a-unit-vector-normalize), MATLAB Central File Exchange. 검색 날짜: .

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

Community Treasure Hunt

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

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

Added error checking
Added output format equal to input format
Added ability to handle multi-dimensional arrays.

1.2.0.0

Changed the code to operate in n dimensions.
It will now transform your vector back to its original notation
Error checking is now done to detect irregular calculations, and NaN values in the output
Changed the name to be more accessible.

1.0.0.0