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 Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by