Normalization of a vector
2 ビュー (過去 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!