필터 지우기
필터 지우기

Normalization of a vector

조회 수: 2 (최근 30일)
Guido Pastore
Guido Pastore 2019년 3월 18일
댓글: Stephan 2019년 3월 18일
How do I normalize an array of double from -1 and +1?

채택된 답변

Stephan
Stephan 2019년 3월 18일
편집: Stephan 2019년 3월 18일
result = normalize(v,'range',[-1 1])
where v is your vector
  댓글 수: 2
Guido Pastore
Guido Pastore 2019년 3월 18일
Thank you so much
Stephan
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개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by