채택된 답변

Stephan
Stephan 2019년 3월 18일
편집: Stephan 2019년 3월 18일

0 개 추천

result = normalize(v,'range',[-1 1])
where v is your vector

댓글 수: 2

Guido Pastore
Guido Pastore 2019년 3월 18일
Thank you so much
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개)

카테고리

도움말 센터File Exchange에서 Data Types에 대해 자세히 알아보기

태그

질문:

2019년 3월 18일

댓글:

2019년 3월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by