Normalization of a vector
조회 수: 4 (최근 30일)
이전 댓글 표시
How do I normalize an array of double from -1 and +1?
댓글 수: 0
채택된 답변
Stephan
2019년 3월 18일
편집: Stephan
2019년 3월 18일
result = normalize(v,'range',[-1 1])
where v is your vector
댓글 수: 2
Stephan
2019년 3월 18일
you may also be interested in:
v = [-2 -1 0; 0.5 1.5 2; 0 2 -1]
result = rescale(v,-1, 1)
which works for arrays. Compare the results of both approaches and choose the option that meets your needs.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!