Normalization of a vector

1 次查看(过去 30 天)
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 个评论
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 中查找有关 Elementary Math 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by